mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
code review: use already available collections where possible
This commit is contained in:
parent
d092f02573
commit
eabeedcd04
@ -1310,7 +1310,7 @@ vAPI.executionCost.start();
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var collapser = domCollapser;
|
var collapser = domCollapser;
|
||||||
var elems = document.getElementsByTagName('img'),
|
var elems = document.images || document.getElementsByTagName('img'),
|
||||||
i = elems.length, elem;
|
i = elems.length, elem;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
elem = elems[i];
|
elem = elems[i];
|
||||||
@ -1318,7 +1318,7 @@ vAPI.executionCost.start();
|
|||||||
collapser.add(elem);
|
collapser.add(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
collapser.addMany(document.getElementsByTagName('embed'));
|
collapser.addMany(document.embeds || document.getElementsByTagName('embed'));
|
||||||
collapser.addMany(document.getElementsByTagName('object'));
|
collapser.addMany(document.getElementsByTagName('object'));
|
||||||
collapser.addIFrames(document.getElementsByTagName('iframe'));
|
collapser.addIFrames(document.getElementsByTagName('iframe'));
|
||||||
collapser.process(0);
|
collapser.process(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user