Skip to content

Commit

Permalink
Merge pull request #181 from tophf/icon16px
Browse files Browse the repository at this point in the history
Use 16/32px icon in new MD toolbar
  • Loading branch information
JasonBarnabe committed Sep 1, 2016
2 parents a5e3a1e + e154494 commit c6df61b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
Binary file added 16w.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 32w.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions manifest.json
Expand Up @@ -51,6 +51,8 @@
"options_page": "manage.html",
"browser_action": {
"default_icon": {
"16": "16w.png",
"32": "32w.png",
"19": "19w.png",
"38": "38w.png"
},
Expand Down
7 changes: 6 additions & 1 deletion messaging.js
Expand Up @@ -47,7 +47,12 @@ function updateIcon(tab, styles) {
var disableAll = "disableAll" in styles ? styles.disableAll : prefs.get("disableAll");
var postfix = styles.length == 0 || disableAll ? "w" : "";
chrome.browserAction.setIcon({
path: {19: "19" + postfix + ".png", 38: "38" + postfix + ".png"},
path: {
// Material Design 2016 new size is 16px
16: "16" + postfix + ".png", 32: "32" + postfix + ".png",
// Chromium forks or non-chromium browsers may still use the traditional 19px
19: "19" + postfix + ".png", 38: "38" + postfix + ".png",
},
tabId: tab.id
}, function() {
// if the tab was just closed an error may occur,
Expand Down

0 comments on commit c6df61b

Please sign in to comment.