diff --git a/js/contentscript-end.js b/js/contentscript-end.js index e6d254ec3..94665f3d9 100644 --- a/js/contentscript-end.js +++ b/js/contentscript-end.js @@ -615,9 +615,6 @@ var uBlockMessaging = (function(name){ (function() { var messaging = uBlockMessaging; - var readyProps = { - 'img': 'complete' - }; var srcProps = { 'embed': 'src', 'iframe': 'src', diff --git a/js/messaging-client.js b/js/messaging-client.js index 1236f69db..660fa1a92 100644 --- a/js/messaging-client.js +++ b/js/messaging-client.js @@ -40,6 +40,8 @@ // implementation of Math.random(), but as long as I have a good expectation // of uniqueness, it's ok, we are not dealing with critical stuff here. +/* global chrome */ + var messaging = (function(name){ var port = null; var requestId = 1; diff --git a/js/messaging.js b/js/messaging.js index 715fbc8ac..beaaf6ac8 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -100,7 +100,6 @@ var announce = function(msg) { defaultHandler(msg, null, nullFunc); // Extension pages & content scripts handlers - var port; for ( var portName in nameToPortMap ) { if ( nameToPortMap.hasOwnProperty(portName) === false ) { continue; @@ -202,7 +201,7 @@ var onDisconnect = function(port) { listener(msg, port.sender, nullFunc); // Cleanup port if no longer in use. - var port = nameToPortMap[port.name]; + port = nameToPortMap[port.name]; if ( port ) { delete nameToPortMap[port.name]; port.onMessage.removeListener(onMessage);