diff options
Diffstat (limited to 'js/firefox/page-shim.js')
-rw-r--r-- | js/firefox/page-shim.js | 14 |
1 files changed, 14 insertions, 0 deletions
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); } }, |