mirror of https://github.com/gorhill/uBlock.git
Fix infinitely appending style property
Related issue: - https://github.com/NanoAdblocker/NanoCore/issues/348
This commit is contained in:
parent
d1715fb19f
commit
a5ba668c38
|
@ -365,11 +365,11 @@ vAPI.DOMFilterer = class {
|
||||||
let attr = node.getAttribute('style');
|
let attr = node.getAttribute('style');
|
||||||
if ( attr === null ) {
|
if ( attr === null ) {
|
||||||
attr = '';
|
attr = '';
|
||||||
} else if (
|
} else if ( attr.length !== 0 ) {
|
||||||
attr.length !== 0 &&
|
if ( attr.endsWith('display:none!important;') ) { continue; }
|
||||||
attr.charCodeAt(attr.length - 1) !== 0x3B /* ';' */
|
if ( attr.charCodeAt(attr.length - 1) !== 0x3B /* ';' */ ) {
|
||||||
) {
|
attr += ';';
|
||||||
attr += ';';
|
}
|
||||||
}
|
}
|
||||||
node.setAttribute('style', attr + 'display:none!important;');
|
node.setAttribute('style', attr + 'display:none!important;');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue