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

Unified Diff: ext/common.js

Issue 29573905: Issue 4580 - Replace ext.devtools with devtools Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Fix ESLint errors Created Oct. 11, 2017, 11:47 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/common.js
===================================================================
--- a/ext/common.js
+++ b/ext/common.js
@@ -156,16 +156,31 @@
let rawCatalog = JSON.parse(xhr.responseText);
for (let msgId in rawCatalog)
{
if (!(msgId in catalog))
catalog[msgId] = parseMessage(rawCatalog[msgId]);
}
};
+ /* Polyfills */
+
+ if (/\/devtools-panel\.html\b/.test(top.location.href))
+ {
+ chrome.devtools = {
+ panels: {
+ openResource() {}
+ },
+
+ inspectedWindow: {
+ reload() {}
+ }
+ };
+ }
+
chrome.i18n = {
getUILanguage()
{
return locales[0].replace(/_/g, "-");
},
getMessage(msgId, substitutions)
{
while (true)

Powered by Google App Engine
This is Rietveld