|
@ -84,7 +84,6 @@ vAPI.messaging = { |
|
|
listeners: {}, |
|
|
listeners: {}, |
|
|
requestId: 1, |
|
|
requestId: 1, |
|
|
connectorId: uniqueId(), |
|
|
connectorId: uniqueId(), |
|
|
bgMessageName: 'µBlock:background', |
|
|
|
|
|
|
|
|
|
|
|
setup: function() { |
|
|
setup: function() { |
|
|
this.connector = function(msg) { |
|
|
this.connector = function(msg) { |
|
@ -125,7 +124,7 @@ vAPI.messaging = { |
|
|
vAPI.messaging.listeners[message.requestId] = callback; |
|
|
vAPI.messaging.listeners[message.requestId] = callback; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sendAsyncMessage(vAPI.messaging.bgMessageName, message); |
|
|
|
|
|
|
|
|
sendAsyncMessage('ublock:background', message); |
|
|
}, |
|
|
}, |
|
|
close: function() { |
|
|
close: function() { |
|
|
delete vAPI.messaging.channels[this.portName]; |
|
|
delete vAPI.messaging.channels[this.portName]; |
|
|