mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-24 19:33:01 +01:00
jshint
This commit is contained in:
parent
2ae09084e0
commit
e822616b06
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
// For non background pages
|
// For non background pages
|
||||||
|
|
||||||
|
/* global self, chrome, vAPI */
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
@ -39,11 +41,15 @@ var messagingConnector = function(response) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var channels = vAPI.messaging.channels;
|
||||||
var channel, listener;
|
var channel, listener;
|
||||||
|
|
||||||
if ( response.broadcast === true ) {
|
if ( response.broadcast === true ) {
|
||||||
for ( channel in vAPI.messaging.channels ) {
|
for ( channel in channels ) {
|
||||||
listener = vAPI.messaging.channels[channel].listener;
|
if ( channels.hasOwnProperty(channel) === false ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
listener = channels[channel].listener;
|
||||||
if ( typeof listener === 'function' ) {
|
if ( typeof listener === 'function' ) {
|
||||||
listener(response.msg);
|
listener(response.msg);
|
||||||
}
|
}
|
||||||
@ -58,7 +64,7 @@ var messagingConnector = function(response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !listener ) {
|
if ( !listener ) {
|
||||||
channel = vAPI.messaging.channels[response.portName];
|
channel = channels[response.portName];
|
||||||
listener = channel && channel.listener;
|
listener = channel && channel.listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user