mirror of https://github.com/gorhill/uBlock.git
let's see if this helps #833
This commit is contained in:
parent
adc84350e3
commit
7d9525d6e9
|
@ -1090,29 +1090,29 @@ var tabWatcher = (function() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( typeof vAPI.toolbarButton.attachToNewWindow === 'function' ) {
|
||||||
|
vAPI.toolbarButton.attachToNewWindow(window);
|
||||||
|
}
|
||||||
|
|
||||||
var tabContainer;
|
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
|
||||||
tabContainer = tabBrowser.tabContainer;
|
tabContainer = tabBrowser.tabContainer;
|
||||||
vAPI.contextMenu.register(window.document);
|
vAPI.contextMenu.register(window.document);
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( typeof vAPI.toolbarButton.attachToNewWindow === 'function' ) {
|
|
||||||
vAPI.toolbarButton.attachToNewWindow(window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/697
|
// https://github.com/gorhill/uBlock/issues/697
|
||||||
// Ignore `TabShow` events: unfortunately the `pending` attribute is
|
// Ignore `TabShow` events: unfortunately the `pending` attribute is
|
||||||
// not set when a tab is opened as a result of session restore -- it is
|
// not set when a tab is opened as a result of session restore -- it is
|
||||||
// set *after* the event is fired in such case.
|
// set *after* the event is fired in such case.
|
||||||
//tabContainer.addEventListener('TabOpen', onOpen);
|
if ( tabContainer ) {
|
||||||
tabContainer.addEventListener('TabShow', onShow);
|
//tabContainer.addEventListener('TabOpen', onOpen);
|
||||||
tabContainer.addEventListener('TabClose', onClose);
|
tabContainer.addEventListener('TabShow', onShow);
|
||||||
// when new window is opened TabSelect doesn't run on the selected tab?
|
tabContainer.addEventListener('TabClose', onClose);
|
||||||
tabContainer.addEventListener('TabSelect', onSelect);
|
// when new window is opened TabSelect doesn't run on the selected tab?
|
||||||
|
tabContainer.addEventListener('TabSelect', onSelect);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
@ -2354,7 +2354,8 @@ vAPI.toolbarButton = {
|
||||||
var addLegacyToolbarButton = function(window) {
|
var addLegacyToolbarButton = function(window) {
|
||||||
var document = window.document;
|
var document = window.document;
|
||||||
|
|
||||||
var toolbox = document.getElementById('navigator-toolbox') || document.getElementById('mail-toolbox');
|
var toolbox = document.getElementById('navigator-toolbox') ||
|
||||||
|
document.getElementById('mail-toolbox');
|
||||||
if ( !toolbox ) {
|
if ( !toolbox ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue