mirror of https://github.com/gorhill/uBlock.git
code review
This commit is contained in:
parent
d724fb23bd
commit
f458fa4adf
|
@ -528,7 +528,7 @@ vAPI.tabs.open = function(details) {
|
||||||
details.url = vAPI.getURL(details.url);
|
details.url = vAPI.getURL(details.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
var win, tab, tabBrowser;
|
var tab;
|
||||||
|
|
||||||
if ( details.select ) {
|
if ( details.select ) {
|
||||||
var URI = Services.io.newURI(details.url, null, null);
|
var URI = Services.io.newURI(details.url, null, null);
|
||||||
|
@ -558,8 +558,8 @@ vAPI.tabs.open = function(details) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
win = Services.wm.getMostRecentWindow('navigator:browser');
|
var win = Services.wm.getMostRecentWindow('navigator:browser');
|
||||||
tabBrowser = getTabBrowser(win);
|
var tabBrowser = getTabBrowser(win);
|
||||||
|
|
||||||
if ( vAPI.fennec ) {
|
if ( vAPI.fennec ) {
|
||||||
tabBrowser.addTab(details.url, {selected: details.active !== false});
|
tabBrowser.addTab(details.url, {selected: details.active !== false});
|
||||||
|
@ -590,9 +590,9 @@ vAPI.tabs.replace = function(tabId, url) {
|
||||||
targetURL = vAPI.getURL(targetURL);
|
targetURL = vAPI.getURL(targetURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
var tab = tabWatcher.browserFromTabId(tabId);
|
var browser = tabWatcher.browserFromTabId(tabId);
|
||||||
if ( tab ) {
|
if ( browser ) {
|
||||||
tabWatcher.browserFromTarget(tab).loadURI(targetURL);
|
browser.loadURI(targetURL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue