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: Address the nits Created June 22, 2017, 1:32 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/common.js ('k') | icons/abp-150.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 (function()
4 { 4 {
5 if ((typeof chrome == "undefined") ||
kzar 2017/06/22 13:45:01 Nit: This seems inconsistent with the check in ext
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
« no previous file with comments | « ext/common.js ('k') | icons/abp-150.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld