mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-13 02:14:17 +01:00
Fix regression in DOM inspector
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1765
Related commit:
- 1285f78e05 (diff-77e1325098616e4d2bb6b1e9ccf3b7cb9898942739e29f01b63346220f55b2b8L250-R250)
This commit is contained in:
parent
d508d34c0a
commit
c7f1af9547
1 changed files with 7 additions and 7 deletions
|
@ -232,7 +232,7 @@ const domLayout = (function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const domNodeFactory = function(level, node) {
|
const domNodeFactory = function(level, node) {
|
||||||
var localName = node.localName;
|
const localName = node.localName;
|
||||||
if ( skipTagNames.has(localName) ) { return null; }
|
if ( skipTagNames.has(localName) ) { return null; }
|
||||||
// skip uBlock's own nodes
|
// skip uBlock's own nodes
|
||||||
if ( node.classList.contains(sessionId) ) { return null; }
|
if ( node.classList.contains(sessionId) ) { return null; }
|
||||||
|
@ -245,14 +245,14 @@ const domLayout = (function() {
|
||||||
// Collect layout data.
|
// Collect layout data.
|
||||||
|
|
||||||
const getLayoutData = function() {
|
const getLayoutData = function() {
|
||||||
var layout = [];
|
const layout = [];
|
||||||
var stack = [];
|
const stack = [];
|
||||||
var node = document;
|
let lvl = 0;
|
||||||
var domNode;
|
let node = document.documentElement;
|
||||||
var lvl = 0;
|
if ( node === null ) { return layout; }
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
domNode = domNodeFactory(lvl, node);
|
const domNode = domNodeFactory(lvl, node);
|
||||||
if ( domNode !== null ) {
|
if ( domNode !== null ) {
|
||||||
layout.push(domNode);
|
layout.push(domNode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue