| 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 (!("devtools" in chrome)) |
| { |
| - return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1; |
| -}); |
| + // Listen for messages from the background page. |
| + chrome.runtime.onMessage.addListener((message, sender, sendResponse) => |
| + { |
| + return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != |
|
Sebastian Noack
2017/08/16 10:15:00
While changing this code anyway, you might want to
Manish Jethani
2017/08/16 10:30:36
I'm assuming you meant `.includes(true)`
Done.
Sebastian Noack
2017/08/16 10:34:56
Sure, that is what I meant, sorry.
|
| + -1; |
| + }); |
| +} |
| (function() |
| { |
| let port = null; |
| ext.onExtensionUnloaded = { |
| addListener(listener) |
| { |