From 3c1cdef241c64627f8943107435e63f21f333681 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 9 Feb 2015 15:24:24 -0500 Subject: [PATCH] this fixes #748 --- src/js/popup.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/js/popup.js b/src/js/popup.js index c97d7f6a5..665aaa939 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -110,7 +110,7 @@ var hashFromPopupData = function(reset) { hasher.push(rule); } } - hasher.push(uDom('#switch').hasClass('off')); + hasher.push(uDom('body').hasClass('off')); var hash = hasher.sort().join(''); if ( reset ) { @@ -330,7 +330,7 @@ var renderPopup = function() { uDom('#version').text(popupData.appVersion); uDom('body').toggleClass('advancedUser', popupData.advancedUserEnabled); - uDom('#switch').toggleClass( + uDom('body').toggleClass( 'off', (popupData.pageURL === '') || (!popupData.netFilteringSwitch) || @@ -398,7 +398,7 @@ var toggleNetFilteringSwitch = function(ev) { what: 'toggleNetFiltering', url: popupData.pageURL, scope: ev.ctrlKey || ev.metaKey ? 'page' : '', - state: !uDom(this).toggleClass('off').hasClass('off'), + state: !uDom('body').toggleClass('off').hasClass('off'), tabId: popupData.tabId }); @@ -538,6 +538,14 @@ var reloadTab = function() { messager.send({ what: 'reloadTab', tabId: popupData.tabId }); // Polling will take care of refreshing the popup content + + // https://github.com/gorhill/uBlock/issues/748 + // User forces a reload, assume the popup has to be updated regardless if + // there were changes or not. + popupData.contentLastModified = -1; + + // No need to wait to remvoe this. + uDom('body').toggleClass('dirty', false); }; /******************************************************************************/