Index: chrome/ext/popup.js |
diff --git a/chrome/ext/popup.js b/chrome/ext/popup.js |
index f5132aa457a4366129078917064aefc9092ebc42..44d2040ad05cd36edb4d76592b70c0f90aff1c1f 100644 |
--- a/chrome/ext/popup.js |
+++ b/chrome/ext/popup.js |
@@ -1,17 +1,18 @@ |
"use strict"; |
+(function() |
{ |
const backgroundPage = chrome.extension.getBackgroundPage(); |
- var ext = Object.create(backgroundPage.ext); |
+ window.ext = Object.create(backgroundPage.ext); |
- ext.closePopup = () => |
+ window.ext.closePopup = () => |
{ |
window.close(); |
}; |
// We have to override ext.backgroundPage, because in order |
// to send messages the local "chrome" namespace must be used. |
- ext.backgroundPage = { |
+ window.ext.backgroundPage = { |
sendMessage: chrome.runtime.sendMessage, |
getWindow() |
@@ -19,4 +20,4 @@ |
return backgroundPage; |
} |
}; |
-} |
+}()); |