diff options
author | Einar Egilsson <einar@einaregilsson.com> | 2015-09-21 16:02:34 +0000 |
---|---|---|
committer | Einar Egilsson <einar@einaregilsson.com> | 2015-09-21 16:02:34 +0000 |
commit | 96560ba904512a429378531c65c70ecaceb9b241 (patch) | |
tree | 0379481eac656aa7213a8867bbeedcf0ef724eff /js/background.js | |
parent | a41cc90f3c401d08cf75a693a0698320b61b8d99 (diff) |
Working in 3 browsers
Diffstat (limited to 'js/background.js')
-rw-r--r-- | js/background.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/js/background.js b/js/background.js index 4cd3d62..40998f7 100644 --- a/js/background.js +++ b/js/background.js @@ -33,11 +33,13 @@ function log(msg) { log.enabled = true; function setIcon(image) { - var sizes = [16,19,32,38,48,64]; - var data = { path: {}}; - for (var s of sizes) { - data.path[s] = 'images/' + image + '-' + s + '.png'; - } + var data = { + path: { + 19 : 'images/' + image + '-19.png', + 38 : 'images/' + image + '-38.png' + } + }; + chrome.browserAction.setIcon(data, function() { var err = chrome.runtime.lastError; if (err) { @@ -132,7 +134,7 @@ function createFilter(redirects) { //FIXME: The Firefox implementation of the url matching is seriously broken still, //so we can't filter by url on Firefox for now, have to cut non http urls out in checkRedirects. return { - urls: isFirefox ? null : ["https://*", "http://*"], + urls: isFirefox ? null : ["https://*/*", "http://*/*"], types : types }; } |