| Index: ext/content.js |
| =================================================================== |
| --- a/ext/content.js |
| +++ b/ext/content.js |
| @@ -1,14 +1,23 @@ |
| "use strict"; |
| -chrome.runtime.onMessage.addListener((message, sender, sendResponse) => |
| +// Firefox 55 erroneously sends messages from the content script to the |
| +// 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 (!chrome.devtools) |
| { |
| - return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1; |
| -}); |
| + // Listen for messages from the background page. |
|
Manish Jethani
2017/07/25 12:52:28
I've added this extra comment here to clarify what
|
| + chrome.runtime.onMessage.addListener((message, sender, sendResponse) => |
| + { |
| + return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != |
| + -1; |
| + }); |
|
Wladimir Palant
2017/08/16 08:56:44
I might be missing something here, but this way th
Manish Jethani
2017/08/16 09:18:54
Yeah, so the devtools panel opens a persistent con
Wladimir Palant
2017/08/16 09:28:33
I see. So why is devtools-panel.html loading ext/c
Manish Jethani
2017/08/16 09:42:43
I went down that route [1] but decided to back off
Wladimir Palant
2017/08/16 10:05:19
You are right, doesn't seem to be worth it right n
|
| +} |
| (function() |
| { |
| let port = null; |
| ext.onExtensionUnloaded = { |
| addListener(listener) |
| { |