Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
this fixes #748
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Feb 9, 2015
1 parent 1c616ee commit 3c1cdef
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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) ||
Expand Down Expand Up @@ -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
});

Expand Down Expand Up @@ -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);
};

/******************************************************************************/
Expand Down

0 comments on commit 3c1cdef

Please sign in to comment.