mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-24 11:22:44 +01:00
this fixes #399
This commit is contained in:
parent
665c05c0a3
commit
0501c0712a
@ -501,11 +501,9 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
|
|||||||
// If `!important` is not there, going back using history will
|
// If `!important` is not there, going back using history will
|
||||||
// likely cause the hidden element to re-appear.
|
// likely cause the hidden element to re-appear.
|
||||||
if ( details.collapse ) {
|
if ( details.collapse ) {
|
||||||
if ( target.parentNode ) {
|
// https://github.com/gorhill/uBlock/issues/399
|
||||||
target.parentNode.removeChild(target);
|
// Never remove elements from the DOM, just hide them
|
||||||
} else {
|
target.style.setProperty('display', 'none', 'important');
|
||||||
target.style.setProperty('display', 'none', 'important');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
target.style.setProperty('visibility', 'hidden', 'important');
|
target.style.setProperty('visibility', 'hidden', 'important');
|
||||||
}
|
}
|
||||||
@ -570,11 +568,9 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
|
|||||||
request = requests[i];
|
request = requests[i];
|
||||||
elem = elements[request.index];
|
elem = elements[request.index];
|
||||||
if ( collapse ) {
|
if ( collapse ) {
|
||||||
if ( elem.parentNode ) {
|
// https://github.com/gorhill/uBlock/issues/399
|
||||||
elem.parentNode.removeChild(elem);
|
// Never remove elements from the DOM, just hide them
|
||||||
} else {
|
elem.style.setProperty('display', 'none', 'important');
|
||||||
elem.style.setProperty('display', 'none', 'important');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
elem.style.setProperty('visibility', 'hidden', 'important');
|
elem.style.setProperty('visibility', 'hidden', 'important');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user