From b73480b4c5face0d52a6cd8276c86d41170888cb Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 14 Apr 2019 16:57:09 -0400 Subject: [PATCH] Update fix for https://github.com/uBlockOrigin/uBlock-issues/issues/468 As suggested by @jspenguin2017: https://github.com/uBlockOrigin/uBlock-issues/issues/468#issuecomment-482863195 --- src/js/dashboard.js | 9 --------- src/js/udom.js | 14 -------------- 2 files changed, 23 deletions(-) diff --git a/src/js/dashboard.js b/src/js/dashboard.js index 580b4fa50..efd744306 100644 --- a/src/js/dashboard.js +++ b/src/js/dashboard.js @@ -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); -}); - /******************************************************************************/ })(); diff --git a/src/js/udom.js b/src/js/udom.js index caa2a824c..d681b9dcc 100644 --- a/src/js/udom.js +++ b/src/js/udom.js @@ -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; })();