1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Fix eslint warnings

This commit is contained in:
Raymond Hill 2024-03-31 13:35:11 -04:00
parent 152e9c9a95
commit 08aa3ebe10
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 1 additions and 8 deletions

View File

@ -19,8 +19,6 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
'use strict';
if ( if (
typeof vAPI === 'object' && typeof vAPI === 'object' &&
typeof vAPI.DOMProceduralFilterer !== 'object' typeof vAPI.DOMProceduralFilterer !== 'object'

View File

@ -19,8 +19,6 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
'use strict';
/******************************************************************************* /*******************************************************************************
+--> domCollapser +--> domCollapser
@ -103,7 +101,7 @@
// https://github.com/chrisaljoudi/uBlock/issues/456 // https://github.com/chrisaljoudi/uBlock/issues/456
// https://github.com/gorhill/uBlock/issues/2029 // https://github.com/gorhill/uBlock/issues/2029
// >>>>>>>> start of HUGE-IF-BLOCK // >>>>>>>> start of HUGE-IF-BLOCK
if ( typeof vAPI === 'object' && !vAPI.contentScript ) { if ( typeof vAPI === 'object' && !vAPI.contentScript ) {
/******************************************************************************/ /******************************************************************************/
@ -1050,7 +1048,6 @@ vAPI.DOMFilterer = class {
const hashes = []; const hashes = [];
const nodes = pendingNodes; const nodes = pendingNodes;
const deadline = t0 + 4; const deadline = t0 + 4;
let processed = 0;
let scanned = 0; let scanned = 0;
for (;;) { for (;;) {
const n = nextPendingNodes(); const n = nextPendingNodes();
@ -1065,10 +1062,8 @@ vAPI.DOMFilterer = class {
classesFromNode(node, hashes); classesFromNode(node, hashes);
scanned += 1; scanned += 1;
} }
processed += n;
if ( performance.now() >= deadline ) { break; } if ( performance.now() >= deadline ) { break; }
} }
//console.info(`[domSurveyor][${hostname}] Surveyed ${scanned}/${processed} nodes in ${(performance.now()-t0).toFixed(2)} ms: ${hashes.length} hashes`);
scannedCount += scanned; scannedCount += scanned;
if ( scannedCount >= maxSurveyNodes ) { if ( scannedCount >= maxSurveyNodes ) {
stop(); stop();