Index: chrome/ext/content.js |
diff --git a/chrome/ext/content.js b/chrome/ext/content.js |
index b54fdcfb0c9f568738704a7587554dfce14949d8..6da72ec4e94fe3d58285b6388df0c12ab9ce1680 100644 |
--- a/chrome/ext/content.js |
+++ b/chrome/ext/content.js |
@@ -1,14 +1,16 @@ |
-chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) |
+"use strict"; |
+ |
+chrome.runtime.onMessage.addListener((message, sender, sendResponse) => |
{ |
return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1; |
}); |
-ext.onExtensionUnloaded = (function() |
+ext.onExtensionUnloaded = (() => |
Sebastian Noack
2017/01/16 15:35:55
The IFEE here existed originally to encapsulate th
kzar
2017/01/17 07:42:44
Done.
|
{ |
- var port = null; |
+ let port = null; |
return { |
- addListener: function(listener) |
+ addListener(listener) |
{ |
if (!port) |
port = chrome.runtime.connect(); |
@@ -17,7 +19,7 @@ ext.onExtensionUnloaded = (function() |
// background page dies and automatically disconnects all ports |
port.onDisconnect.addListener(listener); |
}, |
- removeListener: function(listener) |
+ removeListener(listener) |
{ |
if (port) |
{ |