From a41cc90f3c401d08cf75a693a0698320b61b8d99 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Mon, 21 Sep 2015 15:08:59 +0000 Subject: Almost fully working Firefox --- js/firefox/page-shim.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'js/firefox/page-shim.js') diff --git a/js/firefox/page-shim.js b/js/firefox/page-shim.js index 3531fa4..b6d750a 100644 --- a/js/firefox/page-shim.js +++ b/js/firefox/page-shim.js @@ -1,6 +1,10 @@ (function() { //Communication functions for + if (typeof chrome !== 'undefined') { + return; + } + var messageId = 1; var callbacks = {}; function send(type, message, callback) { @@ -49,11 +53,21 @@ tabs : { query : function(data, callback) { + send('tabs.query', data, callback); + }, + create : function(data, callback) { + send('tabs.create', data, callback); }, update : function(tabId, options, callback) { + if (!options.active) { + throw 'Unexpected update call'; + } + + options.tabId = tabId; + send('tabs.update', options, callback); } }, -- cgit v1.2.3