mirror of https://github.com/gorhill/uBlock.git
As suggested by @jspenguin2017: https://github.com/uBlockOrigin/uBlock-issues/issues/468#issuecomment-482863195
This commit is contained in:
parent
c229003d31
commit
b73480b4c5
|
@ -80,15 +80,6 @@ loadDashboardPanel();
|
|||
window.addEventListener('resize', resizeFrame);
|
||||
uDom('.tabButton').on('click', onTabClickHandler);
|
||||
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/468
|
||||
// See https://github.com/WICG/page-lifecycle
|
||||
document.addEventListener('freeze', ( ) => {
|
||||
uDom('.tabButton').off('click', onTabClickHandler);
|
||||
});
|
||||
document.addEventListener('resume', ( ) => {
|
||||
uDom('.tabButton').on('click', onTabClickHandler);
|
||||
});
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
})();
|
||||
|
|
|
@ -672,20 +672,6 @@ DOMList.prototype.trigger = function(etype) {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
// Cleanup
|
||||
|
||||
const onBeforeUnload = function() {
|
||||
var entry;
|
||||
while ( (entry = listenerEntries.pop()) ) {
|
||||
entry.dispose();
|
||||
}
|
||||
window.removeEventListener('beforeunload', onBeforeUnload);
|
||||
};
|
||||
|
||||
window.addEventListener('beforeunload', onBeforeUnload);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
return DOMListFactory;
|
||||
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue