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

Unified Diff: ext/common.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.
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
« README.md ('K') | « ext/background.js ('k') | ext/popup.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/common.js
===================================================================
--- a/ext/common.js
+++ b/ext/common.js
@@ -19,6 +19,17 @@
(function()
{
+ // Both Edge and Mozilla Web Extensions use the namespace
+ // 'browser' instead of 'chrome'. Edge has chrome namespace defined,
+ // but only with one property: 'app'.
+ if (typeof chrome.extension == "undefined")
+ {
+ let {app: tempApp} = chrome;
+ window.chrome = window.browser;
+ if (typeof chrome.app == "undefined")
Sebastian Noack 2017/06/14 05:13:39 We don't use chrome.app anyway, so I guess we can
Oleksandr 2017/06/15 11:21:32 Done.
+ chrome.app = tempApp;
+ }
+
window.ext = {};
let EventTarget = ext._EventTarget = function()
« README.md ('K') | « ext/background.js ('k') | ext/popup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld