Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ext/popup.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ext/devtools.js ('k') | icons/abp-16-notification-critical.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/popup.js
===================================================================
rename from chrome/ext/popup.js
rename to ext/popup.js
--- a/chrome/ext/popup.js
+++ b/ext/popup.js
@@ -1,18 +1,20 @@
"use strict";
+(function()
{
if ((typeof chrome == "undefined") || (typeof chrome.extension == "undefined"))
chrome = browser;
const backgroundPage = chrome.extension.getBackgroundPage();
- var ext = Object.create(backgroundPage.ext);
- ext.closePopup = () =>
+ window.ext = Object.create(backgroundPage.ext);
+
+ 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()
@@ -20,4 +22,4 @@
return backgroundPage;
}
};
-}
+}());
« no previous file with comments | « ext/devtools.js ('k') | icons/abp-16-notification-critical.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld