mirror of https://github.com/gorhill/uBlock.git
this fixes #762
This commit is contained in:
parent
97a2cf8d58
commit
34b58178bc
|
@ -474,13 +474,12 @@ var uBlockCollapser = (function() {
|
||||||
var elem, shadow;
|
var elem, shadow;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
elem = elems[i];
|
elem = elems[i];
|
||||||
shadow = elem.shadowRoot;
|
// https://github.com/gorhill/uBlock/issues/762
|
||||||
|
// Always hide using inline style.
|
||||||
|
elem.style.setProperty('display', 'none', 'important');
|
||||||
// https://www.chromestatus.com/features/4668884095336448
|
// https://www.chromestatus.com/features/4668884095336448
|
||||||
// "Multiple shadow roots is being deprecated."
|
// "Multiple shadow roots is being deprecated."
|
||||||
if ( shadow !== null ) {
|
if ( elem.shadowRoot !== null ) {
|
||||||
if ( shadow.className !== sessionId ) {
|
|
||||||
elem.style.setProperty('display', 'none', 'important');
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// https://github.com/gorhill/uBlock/pull/555
|
// https://github.com/gorhill/uBlock/pull/555
|
||||||
|
@ -490,7 +489,6 @@ var uBlockCollapser = (function() {
|
||||||
shadow = elem.createShadowRoot();
|
shadow = elem.createShadowRoot();
|
||||||
shadow.className = sessionId;
|
shadow.className = sessionId;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
elem.style.setProperty('display', 'none', 'important');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue