|
|
@ -691,6 +691,24 @@ vAPI.tabs.open = function(details) {
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Replace the URL of a tab. Noop if the tab does not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vAPI.tabs.replace = function(tabId, url) {
|
|
|
|
|
|
|
|
var targetURL = url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// extension pages
|
|
|
|
|
|
|
|
if ( /^[\w-]{2,}:/.test(targetURL) !== true ) {
|
|
|
|
|
|
|
|
targetURL = vAPI.getURL(targetURL);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var tab = this.getTabsForIds(tabId);
|
|
|
|
|
|
|
|
if ( tab ) {
|
|
|
|
|
|
|
|
getBrowserForTab(tab).loadURI(targetURL);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
vAPI.tabs._remove = function(tab, tabBrowser) {
|
|
|
|
vAPI.tabs._remove = function(tab, tabBrowser) {
|
|
|
|
if ( vAPI.fennec ) {
|
|
|
|
if ( vAPI.fennec ) {
|
|
|
|
tabBrowser.closeTab(tab);
|
|
|
|
tabBrowser.closeTab(tab);
|
|
|
@ -1119,18 +1137,13 @@ var httpObserver = {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( result.redirectUrl ) {
|
|
|
|
/*if ( result.redirectUrl ) {
|
|
|
|
if ( type === 'main_frame' ) {
|
|
|
|
channel.redirectionLimit = 1;
|
|
|
|
channel.cancel(this.ABORT);
|
|
|
|
|
|
|
|
vAPI.tabs.open({ tabId: details.tabId, url: result.redirectUrl });
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*channel.redirectionLimit = 1;
|
|
|
|
|
|
|
|
channel.redirectTo(
|
|
|
|
channel.redirectTo(
|
|
|
|
Services.io.newURI(result.redirectUrl, null, null)
|
|
|
|
Services.io.newURI(result.redirectUrl, null, null)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return true;*/
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|