A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gorhill/uBlock/commit/bd7ce412244691290ca134aa344b831aa8f41c53 below:

Remove "Purge all caches" button from "Filter lists" pane · gorhill/uBlock@bd7ce41 · GitHub

@@ -276,7 +276,7 @@ const renderFilterLists = ( ) => {

276 276

renderWidgets();

277 277

};

278 278 279 -

vAPI.messaging.send('dashboard', {

279 +

return vAPI.messaging.send('dashboard', {

280 280

what: 'getLists',

281 281

}).then(response => {

282 282

onListsReceived(response);

@@ -295,9 +295,6 @@ const renderWidgets = ( ) => {

295 295

updating === false &&

296 296

qs$('#lists .listEntry.checked.obsolete:not(.toRemove)') === null

297 297

);

298 -

dom.cl.toggle('#buttonPurgeAll', 'disabled',

299 -

updating || qs$('#lists .listEntry.cached:not(.obsolete)') === null

300 -

);

301 298

};

302 299 303 300

/******************************************************************************/

@@ -510,15 +507,17 @@ const onPurgeClicked = ev => {

510 507

}

511 508 512 509

vAPI.messaging.send('dashboard', {

513 -

what: 'purgeCaches',

510 +

what: 'listsUpdateNow',

514 511

assetKeys,

512 +

preferOrigin: ev.shiftKey,

515 513

});

516 514 517 515

// If the cached version is purged, the installed version must be assumed

518 516

// to be obsolete.

519 517

// https://github.com/gorhill/uBlock/issues/1733

520 518

// An external filter list must not be marked as obsolete, they will

521 519

// always be fetched anyways if there is no cached copy.

520 +

dom.cl.add(dom.body, 'updating');

522 521

dom.cl.add(liEntry, 'obsolete');

523 522 524 523

if ( qs$(liEntry, 'input[type="checkbox"]').checked ) {

@@ -608,25 +607,13 @@ const buttonUpdateHandler = async ( ) => {

608 607

await selectFilterLists();

609 608

dom.cl.add(dom.body, 'updating');

610 609

renderWidgets();

611 -

vAPI.messaging.send('dashboard', { what: 'forceUpdateAssets' });

610 +

vAPI.messaging.send('dashboard', { what: 'updateNow' });

612 611

};

613 612 614 613

dom.on('#buttonUpdate', 'click', ( ) => { buttonUpdateHandler(); });

615 614 616 615

/******************************************************************************/

617 616 618 -

const buttonPurgeAllHandler = async hard => {

619 -

await vAPI.messaging.send('dashboard', {

620 -

what: 'purgeAllCaches',

621 -

hard,

622 -

});

623 -

renderFilterLists(true);

624 -

};

625 - 626 -

dom.on('#buttonPurgeAll', 'click', ev => { buttonPurgeAllHandler(ev.shiftKey); });

627 - 628 -

/******************************************************************************/

629 - 630 617

const userSettingCheckboxChanged = ( ) => {

631 618

const target = event.target;

632 619

vAPI.messaging.send('dashboard', {

@@ -863,6 +850,12 @@ self.hasUnsavedData = function() {

863 850 864 851

/******************************************************************************/

865 852 866 -

renderFilterLists();

853 +

renderFilterLists().then(( ) => {

854 +

const buttonUpdate = qs$('#buttonUpdate');

855 +

if ( dom.cl.has(buttonUpdate, 'active') ) { return; }

856 +

if ( dom.cl.has(buttonUpdate, 'disabled') ) { return; }

857 +

if ( listsetDetails.autoUpdate !== true ) { return; }

858 +

buttonUpdateHandler();

859 +

});

867 860 868 861

/******************************************************************************/


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4