Skip to content

Commit 19ba5b0

Browse files
committed
Add icon sizes to setIcon to match manifest browserAction
1 parent 8dabef1 commit 19ba5b0

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ This results in a cleaner migration for existing Firefox users.
1919

2020
2. Modify old version to detect if it's running on Firefox, prompt the user to install the new extension and uninstall the old extension.
2121
```
22-
AddonManager.getInstallForURL('https://addons.mozilla.org/firefox/downloads/latest/markdown-here/addon-375281-latest.xpi', function(install) {console.log(arguments); install.install()}, 'application/x-xpinstall')
22+
AddonManager.getInstallForURL('https://addons.mozilla.org/firefox/downloads/latest/markdown-here/addon-375281-latest.xpi', function(install) {console.log(arguments); install.install()}, 'application/x-xpinstall');
23+
24+
AddonManager.getAddonByID('[email protected]', function(install) {console.log(arguments); install.uninstall()});
2325
```
2426

2527
3. Coordinate with AMO reviewers to allow the install/uninstall action. (Via IRC?)

src/chrome/backgroundscript.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ chrome.runtime.onMessage.addListener(function(request, sender, responseCallback)
9595
tabId: sender.tab.id });
9696
chrome.browserAction.setIcon({
9797
path: {
98+
"16": Utils.getLocalURL('/common/images/icon16-button-monochrome.png'),
9899
"19": Utils.getLocalURL('/common/images/icon19-button-monochrome.png'),
99-
"38": Utils.getLocalURL('/common/images/icon38-button-monochrome.png')
100+
"32": Utils.getLocalURL('/common/images/icon32-button-monochrome.png'),
101+
"38": Utils.getLocalURL('/common/images/icon38-button-monochrome.png'),
102+
"64": Utils.getLocalURL('/common/images/icon64-button-monochrome.png')
100103
},
101104
tabId: sender.tab.id });
102105
return false;
@@ -108,8 +111,11 @@ chrome.runtime.onMessage.addListener(function(request, sender, responseCallback)
108111
tabId: sender.tab.id });
109112
chrome.browserAction.setIcon({
110113
path: {
114+
"16": Utils.getLocalURL('/common/images/icon16-button-disabled.png'),
111115
"19": Utils.getLocalURL('/common/images/icon19-button-disabled.png'),
112-
"38": Utils.getLocalURL('/common/images/icon38-button-disabled.png')
116+
"32": Utils.getLocalURL('/common/images/icon32-button-disabled.png'),
117+
"38": Utils.getLocalURL('/common/images/icon38-button-disabled.png'),
118+
"64": Utils.getLocalURL('/common/images/icon64-button-disabled.png')
113119
},
114120
tabId: sender.tab.id });
115121
return false;

0 commit comments

Comments
 (0)