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

Unified Diff: ext/content.js

Issue 29532730: Noissue - Rebase current master tip to edge bookmark (Closed)
Patch Set: Created Aug. 31, 2017, 2:55 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
« no previous file with comments | « ext/background.js ('k') | include.preload.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/content.js
===================================================================
--- a/ext/content.js
+++ b/ext/content.js
@@ -4,7 +4,9 @@
// devtools panel:
// https://bugzilla.mozilla.org/show_bug.cgi?id=1383310
// As a workaround, listen for messages only if this isn't the devtools panel.
-if (!("devtools" in chrome))
+// Note that Firefox processes API access lazily, so chrome.devtools will always
+// exist but will have undefined as its value on other pages.
+if (!chrome.devtools)
{
// Listen for messages from the background page.
chrome.runtime.onMessage.addListener((message, sender, sendResponse) =>
« no previous file with comments | « ext/background.js ('k') | include.preload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld