Index: ext/popup.js |
=================================================================== |
--- a/ext/popup.js |
+++ b/ext/popup.js |
@@ -1,20 +1,18 @@ |
"use strict"; |
(function() |
{ |
- if (typeof chrome == "undefined" || typeof chrome.extension == "undefined") |
Manish Jethani
2017/10/09 15:49:41
This is redundant since it's already done in ext/c
|
- window.chrome = browser; |
- const backgroundPage = chrome.extension.getBackgroundPage(); |
+ const backgroundPage = browser.extension.getBackgroundPage(); |
window.ext = Object.create(backgroundPage.ext); |
// We have to override ext.backgroundPage, because in order |
- // to send messages the local "chrome" namespace must be used. |
+ // to send messages the local "browser" namespace must be used. |
window.ext.backgroundPage = { |
- sendMessage: chrome.runtime.sendMessage, |
+ sendMessage: browser.runtime.sendMessage, |
getWindow() |
{ |
return backgroundPage; |
} |
}; |
}()); |