From 0bc67a8819372cb696b687ca34982f58b4e7e10a Mon Sep 17 00:00:00 2001 From: Deathamns Date: Tue, 4 Nov 2014 12:32:44 +0100 Subject: [PATCH] Drop js-loader, updates from gorhill/uBlock/master --- src/js/vapi-client.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/js/vapi-client.js b/src/js/vapi-client.js index 071f813..51d7311 100644 --- a/src/js/vapi-client.js +++ b/src/js/vapi-client.js @@ -74,14 +74,14 @@ if (self.chrome) { return; } - if (!this.listenerId) { - this.setup(); - } - this.channels[name] = { portName: name, listener: typeof callback === 'function' ? callback : null, send: function(message, callback) { + if (!vAPI.messaging.listenerId) { + vAPI.messaging.setup(); + } + message = { portName: this.portName, msg: message @@ -137,14 +137,14 @@ if (self.chrome) { return; } - if (!this._connector) { - this.setup(); - } - this.channels[name] = { portName: name, listener: typeof callback === 'function' ? callback : null, send: function(message, callback) { + if (!vAPI.messaging._connector) { + vAPI.messaging.setup(); + } + message = { portName: this.portName, msg: message