mirror of https://github.com/gorhill/uBlock.git
Fix eslint warnings
This commit is contained in:
parent
152e9c9a95
commit
08aa3ebe10
|
@ -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'
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue