1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-22 18:32:45 +01:00
This commit is contained in:
gorhill 2015-06-23 14:50:45 -04:00
parent 6c1678d718
commit c596e6c0e1

View File

@ -998,10 +998,9 @@ var tabWatcher = (function() {
}
var tabContainer = null;
if ( tabBrowser.deck ) {
// Fennec
if ( tabBrowser.deck ) { // Fennec
tabContainer = tabBrowser.deck;
} else if ( tabBrowser.tabContainer ) {
} else if ( tabBrowser.tabContainer ) { // Firefox
tabContainer = tabBrowser.tabContainer;
}
if ( tabContainer ) {
@ -1025,6 +1024,7 @@ var tabWatcher = (function() {
browser = browserFromTarget(tab);
tabId = browserToTabIdMap.get(browser);
if ( tabId !== undefined ) {
removeBrowserEntry(tabId, browser);
tabIdToBrowserMap.delete(tabId);
}
browserToTabIdMap.delete(browser);
@ -1036,6 +1036,11 @@ var tabWatcher = (function() {
observe: function(win, topic) {
if ( topic === 'domwindowopened' ) {
win.addEventListener('DOMContentLoaded', onWindowLoad);
return;
}
if ( topic === 'domwindowclosed' ) {
onWindowUnload.call(win);
return;
}
}
};