Raymond Hill 2021-10-15 16:55:40 -04:00
parent d508d34c0a
commit c7f1af9547
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 7 additions and 7 deletions

View File

@ -232,7 +232,7 @@ const domLayout = (function() {
};
const domNodeFactory = function(level, node) {
var localName = node.localName;
const localName = node.localName;
if ( skipTagNames.has(localName) ) { return null; }
// skip uBlock's own nodes
if ( node.classList.contains(sessionId) ) { return null; }
@ -245,14 +245,14 @@ const domLayout = (function() {
// Collect layout data.
const getLayoutData = function() {
var layout = [];
var stack = [];
var node = document;
var domNode;
var lvl = 0;
const layout = [];
const stack = [];
let lvl = 0;
let node = document.documentElement;
if ( node === null ) { return layout; }
for (;;) {
domNode = domNodeFactory(lvl, node);
const domNode = domNodeFactory(lvl, node);
if ( domNode !== null ) {
layout.push(domNode);
}