Index: ext/content.js |
=================================================================== |
--- a/ext/content.js |
+++ b/ext/content.js |
@@ -10,17 +10,16 @@ |
{ |
// Listen for messages from the background page. |
browser.runtime.onMessage.addListener((message, sender, sendResponse) => |
{ |
return ext.onMessage._dispatch(message, {}, sendResponse).includes(true); |
}); |
} |
-(function() |
{ |
let port = null; |
ext.onExtensionUnloaded = { |
addListener(listener) |
{ |
if (!port) |
port = browser.runtime.connect(); |
@@ -38,9 +37,9 @@ |
if (!port.onDisconnect.hasListeners()) |
{ |
port.disconnect(); |
port = null; |
} |
} |
} |
}; |
-}()); |
+} |