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

Side by Side Diff: ext/popup.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Patch Set: Rebase the README.md, compress images, adress the comments Created June 14, 2017, 3:33 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 (function()
4 { 4 {
5 if ((typeof chrome == "undefined") ||
6 (typeof chrome.extension == "undefined"))
7 window.chrome = browser;
5 const backgroundPage = chrome.extension.getBackgroundPage(); 8 const backgroundPage = chrome.extension.getBackgroundPage();
6 window.ext = Object.create(backgroundPage.ext); 9 window.ext = Object.create(backgroundPage.ext);
7 10
8 window.ext.closePopup = () => 11 window.ext.closePopup = () =>
9 { 12 {
10 window.close(); 13 window.close();
11 }; 14 };
12 15
13 // We have to override ext.backgroundPage, because in order 16 // We have to override ext.backgroundPage, because in order
14 // to send messages the local "chrome" namespace must be used. 17 // to send messages the local "chrome" namespace must be used.
15 window.ext.backgroundPage = { 18 window.ext.backgroundPage = {
16 sendMessage: chrome.runtime.sendMessage, 19 sendMessage: chrome.runtime.sendMessage,
17 20
18 getWindow() 21 getWindow()
19 { 22 {
20 return backgroundPage; 23 return backgroundPage;
21 } 24 }
22 }; 25 };
23 }()); 26 }());
OLDNEW
« ext/common.js ('K') | « ext/common.js ('k') | icons/abp-150.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld