mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
code review for 7d100f7b21: just the very slow opportunistic walk toward full ES6 code base
This commit is contained in:
parent
7d100f7b21
commit
835dcd41f2
1 changed files with 3 additions and 6 deletions
|
|
@ -764,9 +764,8 @@ var filterToDOMInterface = (function() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const out = [];
|
const out = [];
|
||||||
let iElem = elems.length;
|
for ( const elem of elems ) {
|
||||||
while ( iElem-- ) {
|
out.push({ type: 'cosmetic', elem });
|
||||||
out.push({ type: 'cosmetic', elem: elems[iElem]});
|
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
|
|
@ -1584,9 +1583,7 @@ var startPicker = function(details) {
|
||||||
const attr = srcAttrMap[tagName];
|
const attr = srcAttrMap[tagName];
|
||||||
if ( attr === undefined ) { return; }
|
if ( attr === undefined ) { return; }
|
||||||
const elems = document.getElementsByTagName(tagName);
|
const elems = document.getElementsByTagName(tagName);
|
||||||
let i = elems.length;
|
for ( const elem of elems ) {
|
||||||
while ( i-- ) {
|
|
||||||
const elem = elems[i];
|
|
||||||
if ( elem === pickerRoot ) { continue; }
|
if ( elem === pickerRoot ) { continue; }
|
||||||
const src = elem[attr];
|
const src = elem[attr];
|
||||||
if ( typeof src !== 'string' ) { continue; }
|
if ( typeof src !== 'string' ) { continue; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue