mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
fix "purge all" button not disabled when there is nothing left to purge
This commit is contained in:
parent
c77830995b
commit
8d2319e011
@ -276,7 +276,10 @@ var renderFilterLists = function(soft) {
|
||||
|
||||
var renderWidgets = function() {
|
||||
uDom('#buttonApply').toggleClass('disabled', filteringSettingsHash === hashFromCurrentFromSettings());
|
||||
uDom('#buttonPurgeAll').toggleClass('disabled', document.querySelector('#lists .listEntry.cached') === null);
|
||||
uDom('#buttonPurgeAll').toggleClass(
|
||||
'disabled',
|
||||
document.querySelector('#lists .listEntry.cached:not(.obsolete)') === null
|
||||
);
|
||||
uDom('#buttonUpdate').toggleClass('disabled', document.querySelector('body:not(.updating) #lists .listEntry.obsolete > input[type="checkbox"]:checked') === null);
|
||||
};
|
||||
|
||||
|
@ -75,13 +75,14 @@
|
||||
return th;
|
||||
},
|
||||
|
||||
// https://github.com/chrisaljoudi/uBlock/issues/1118
|
||||
// We limit to a maximum number of tokens.
|
||||
|
||||
_tokenize: function() {
|
||||
var tokens = this._tokens,
|
||||
url = this._urlOut,
|
||||
l = url.length;
|
||||
if ( l === 0 ) { tokens[0] = 0; return; }
|
||||
// https://github.com/chrisaljoudi/uBlock/issues/1118
|
||||
// We limit to a maximum number of tokens.
|
||||
if ( l > 2048 ) {
|
||||
url = url.slice(0, 2048);
|
||||
l = 2048;
|
||||
|
Loading…
Reference in New Issue
Block a user