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

Side by Side Diff: ext/popup.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ext/devtools.js ('k') | icons/abp-16-notification-critical.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 (function()
3 { 4 {
4 if ((typeof chrome == "undefined") || (typeof chrome.extension == "undefined")) 5 if ((typeof chrome == "undefined") || (typeof chrome.extension == "undefined"))
5 chrome = browser; 6 chrome = browser;
6 const backgroundPage = chrome.extension.getBackgroundPage(); 7 const backgroundPage = chrome.extension.getBackgroundPage();
7 var ext = Object.create(backgroundPage.ext); 8 window.ext = Object.create(backgroundPage.ext);
8 ext.closePopup = () => 9
10 window.ext.closePopup = () =>
9 { 11 {
10 window.close(); 12 window.close();
11 }; 13 };
12 14
13 // We have to override ext.backgroundPage, because in order 15 // We have to override ext.backgroundPage, because in order
14 // to send messages the local "chrome" namespace must be used. 16 // to send messages the local "chrome" namespace must be used.
15 ext.backgroundPage = { 17 window.ext.backgroundPage = {
16 sendMessage: chrome.runtime.sendMessage, 18 sendMessage: chrome.runtime.sendMessage,
17 19
18 getWindow() 20 getWindow()
19 { 21 {
20 return backgroundPage; 22 return backgroundPage;
21 } 23 }
22 }; 24 };
23 } 25 }());
OLDNEW
« 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