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

Side by Side Diff: chrome/ext/popup.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Tidy up hasRecord and some notification logic Created March 31, 2017, 3:36 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 (function()
3 { 4 {
4 const backgroundPage = chrome.extension.getBackgroundPage(); 5 const backgroundPage = chrome.extension.getBackgroundPage();
5 var ext = Object.create(backgroundPage.ext); 6 window.ext = Object.create(backgroundPage.ext);
6 7
7 ext.closePopup = () => 8 window.ext.closePopup = () =>
8 { 9 {
9 window.close(); 10 window.close();
10 }; 11 };
11 12
12 // We have to override ext.backgroundPage, because in order 13 // We have to override ext.backgroundPage, because in order
13 // to send messages the local "chrome" namespace must be used. 14 // to send messages the local "chrome" namespace must be used.
14 ext.backgroundPage = { 15 window.ext.backgroundPage = {
15 sendMessage: chrome.runtime.sendMessage, 16 sendMessage: chrome.runtime.sendMessage,
16 17
17 getWindow() 18 getWindow()
18 { 19 {
19 return backgroundPage; 20 return backgroundPage;
20 } 21 }
21 }; 22 };
22 } 23 }());
OLDNEW
« no previous file with comments | « chrome/ext/devtools.js ('k') | composer.js » ('j') | lib/devtools.js » ('J')

Powered by Google App Engine
This is Rietveld