Firefox: blocking and content scripts for e10s

pull/2/head
Deathamns 10 years ago committed by gorhill
parent c752853031
commit 706a51c211

@ -140,6 +140,8 @@ vAPI.tabs.open = function(details) {
}; };
if ( details.tabId ) { if ( details.tabId ) {
details.tabId = parseInt(tabId, 10);
// update doesn't accept index, must use move // update doesn't accept index, must use move
chrome.tabs.update(details.tabId, _details, function(tab) { chrome.tabs.update(details.tabId, _details, function(tab) {
// if the tab doesn't exist // if the tab doesn't exist
@ -203,7 +205,7 @@ vAPI.tabs.remove = function(tabId) {
if ( vAPI.lastError() ) { if ( vAPI.lastError() ) {
} }
}; };
chrome.tabs.remove(tabId, onTabRemoved); chrome.tabs.remove(parseInt(tabId, 10), onTabRemoved);
}; };
/******************************************************************************/ /******************************************************************************/
@ -227,6 +229,7 @@ vAPI.tabs.injectScript = function(tabId, details, callback) {
} }
}; };
if ( tabId ) { if ( tabId ) {
tabid = parseInt(tabId, 10);
chrome.tabs.executeScript(tabId, details, onScriptExecuted); chrome.tabs.executeScript(tabId, details, onScriptExecuted);
} else { } else {
chrome.tabs.executeScript(details, onScriptExecuted); chrome.tabs.executeScript(details, onScriptExecuted);
@ -243,6 +246,7 @@ vAPI.tabs.injectScript = function(tabId, details, callback) {
// anymore, so this ensures it does still exist. // anymore, so this ensures it does still exist.
vAPI.setIcon = function(tabId, img, badge) { vAPI.setIcon = function(tabId, img, badge) {
tabId = parseInt(tabId, 10);
var onIconReady = function() { var onIconReady = function() {
if ( vAPI.lastError() ) { if ( vAPI.lastError() ) {
return; return;

Loading…
Cancel
Save