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

Unified Diff: ext/popup.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Patch Set: Workaround CSS.excape, i18n issue and use typeof for 'undefined' detection Created July 17, 2017, 12:51 p.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
Index: ext/popup.js
===================================================================
--- a/ext/popup.js
+++ b/ext/popup.js
@@ -2,6 +2,8 @@
(function()
{
+ if (typeof chrome == "undefined" || typeof chrome.extension == "undefined")
+ window.chrome = browser;
const backgroundPage = chrome.extension.getBackgroundPage();
window.ext = Object.create(backgroundPage.ext);
@@ -10,6 +12,10 @@
window.close();
};
+ // Edge needs the i18n to be local, otherwise it can't process substitutions
kzar 2017/07/17 14:08:19 How about this? "Calling i18n from the background
Oleksandr 2017/07/17 23:52:09 Rephrased to be more precise. Calling i18n alone d
kzar 2017/07/18 09:30:49 "Calling i18n.getMessage from the background page
kzar 2017/07/18 10:36:23 It seems like your latest improvement to this comm
+ // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12793975/
+ window.ext.i18n = chrome.i18n;
+
// We have to override ext.backgroundPage, because in order
// to send messages the local "chrome" namespace must be used.
window.ext.backgroundPage = {

Powered by Google App Engine
This is Rietveld