Skip to content

Commit

Permalink
Fixes catholicon#13. Min FF version is upped to 29 now (new API for t…
Browse files Browse the repository at this point in the history
…oolbar button is availabled from FF29 onwards)
  • Loading branch information
catholicon committed Apr 29, 2014
1 parent 0df5066 commit b4e58e5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 29 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Credits:
* QR code generator by Kazuhiko Arase
* rendering qr code generated from above on html5 canvas by Amanuel Tewolde
* JS based utf8 encoding from http://www.webtoolkit.info/javascript-utf8.html
* toolbar icon: http://www.iconfinder.com/icondetails/25689/16/barcode_2d_icon
* 16x16px icon: http://www.iconfinder.com/icondetails/25689/16/barcode_2d_icon
* 32x32px icon: https://www.iconfinder.com/icons/174693/code_qr_icon#size=32 (author page: http://icons8.com/)
* Local file save javascript from https://github.com/eligrey/FileSaver.js
* Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome
* Copied some styles from Twitter's Bootstrap project :) - http://twitter.github.io/bootstrap/
Expand Down
File renamed without changes
Binary file added data/toolbar/assets/qr-button-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions data/toolbar/widget.css

This file was deleted.

9 changes: 0 additions & 9 deletions data/toolbar/widget.html

This file was deleted.

5 changes: 0 additions & 5 deletions data/toolbar/widget.js

This file was deleted.

23 changes: 12 additions & 11 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ var { Hotkey } = require("sdk/hotkeys");
var data = require("sdk/self").data;
var prefs = require("sdk/simple-prefs");

var toolbarWidget = require("sdk/widget").Widget(
{
id: "qrIcon",
label: "Show QR",
icon: data.url("toolbar/assets/qrIcon.png"),
contentURL: data.url("toolbar/widget.html"),
contentScriptFile: data.url("toolbar/widget.js")
});
toolbarWidget.port.on("showQR", function()
{
findAndSendQRText();
var {ActionButton} = require("sdk/ui/button/action");

var button = ActionButton({
id: "qr-button",
label: "Show QR",
icon: {
"16": data.url("toolbar/assets/qr-button-16.png"),
"32": data.url("toolbar/assets/qr-button-32.png")
},
onClick: function(state) {
findAndSendQRText();
}
});

exports.main = function(options, callbacks)
Expand Down

0 comments on commit b4e58e5

Please sign in to comment.