diff options
author | gorhill <rhill@raymondhill.net> | 2015-09-28 15:50:09 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-09-28 15:50:09 -0400 |
commit | 34b58178bc7abafb55b6c2c1fd69c80f1be5b938 (patch) | |
tree | 06d29b97eb81b68c28ee0e5573ccb093558799dc /src | |
parent | 97a2cf8d58bbff6f10f11c469b3ae799fa09c07d (diff) | |
download | uBlock-34b58178bc7abafb55b6c2c1fd69c80f1be5b938.zip uBlock-34b58178bc7abafb55b6c2c1fd69c80f1be5b938.tar.gz uBlock-34b58178bc7abafb55b6c2c1fd69c80f1be5b938.tar.bz2 |
this fixes #762
Diffstat (limited to 'src')
-rw-r--r-- | src/js/contentscript-end.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 776862f..16d0cbf 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -474,13 +474,12 @@ var uBlockCollapser = (function() { var elem, shadow; while ( 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 // "Multiple shadow roots is being deprecated." - if ( shadow !== null ) { - if ( shadow.className !== sessionId ) { - elem.style.setProperty('display', 'none', 'important'); - } + if ( elem.shadowRoot !== null ) { continue; } // https://github.com/gorhill/uBlock/pull/555 @@ -490,7 +489,6 @@ var uBlockCollapser = (function() { shadow = elem.createShadowRoot(); shadow.className = sessionId; } catch (ex) { - elem.style.setProperty('display', 'none', 'important'); } } }; |