mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 02:42:41 +01:00
this fixes #574
This commit is contained in:
parent
980125b8af
commit
8e4f998a32
@ -1039,7 +1039,7 @@ var tabWatcher = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tabContainer = null;
|
var tabContainer;
|
||||||
if ( tabBrowser.deck ) { // Fennec
|
if ( tabBrowser.deck ) { // Fennec
|
||||||
tabContainer = tabBrowser.deck;
|
tabContainer = tabBrowser.deck;
|
||||||
} else if ( tabBrowser.tabContainer ) { // Firefox
|
} else if ( tabBrowser.tabContainer ) { // Firefox
|
||||||
@ -1052,8 +1052,20 @@ var tabWatcher = (function() {
|
|||||||
tabContainer.removeEventListener('TabSelect', onSelect);
|
tabContainer.removeEventListener('TabSelect', onSelect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/574
|
||||||
|
// To keep in mind: not all windows are tab containers,
|
||||||
|
// sometimes the window IS the tab.
|
||||||
|
var tabs;
|
||||||
|
if ( tabBrowser.tabs ) {
|
||||||
|
tabs = tabBrowser.tabs;
|
||||||
|
} else if ( tabBrowser.localName === 'browser' ) {
|
||||||
|
tabs = [tabBrowser];
|
||||||
|
} else {
|
||||||
|
tabs = [];
|
||||||
|
}
|
||||||
|
|
||||||
var browser, URI, tabId;
|
var browser, URI, tabId;
|
||||||
for ( var tab of tabBrowser.tabs ) {
|
for ( var tab of tabs ) {
|
||||||
browser = tabWatcher.browserFromTarget(tab);
|
browser = tabWatcher.browserFromTarget(tab);
|
||||||
if ( browser === null ) {
|
if ( browser === null ) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user