mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
code review for #156
This commit is contained in:
parent
4452644980
commit
3f8cbc3020
@ -537,7 +537,11 @@ var uBlockMessaging = (function(name){
|
|||||||
// likely cause the hidden element to re-appear.
|
// likely cause the hidden element to re-appear.
|
||||||
elem.style.visibility = 'hidden !important';
|
elem.style.visibility = 'hidden !important';
|
||||||
if ( collapse ) {
|
if ( collapse ) {
|
||||||
elem.parentNode.removeChild(elem);
|
if ( elem.parentNode ) {
|
||||||
|
elem.parentNode.removeChild(elem);
|
||||||
|
} else {
|
||||||
|
elem.style.display = 'none !important';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
selectors.push(tagName + '[' + prop + '="' + src + '"]');
|
selectors.push(tagName + '[' + prop + '="' + src + '"]');
|
||||||
}
|
}
|
||||||
@ -589,8 +593,12 @@ var uBlockMessaging = (function(name){
|
|||||||
// 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.
|
||||||
target.style.visibility = 'hidden !important';
|
target.style.visibility = 'hidden !important';
|
||||||
if ( details.collapse && target.parentNode ) {
|
if ( details.collapse ) {
|
||||||
target.parentNode.removeChild(target);
|
if ( target.parentNode ) {
|
||||||
|
target.parentNode.removeChild(target);
|
||||||
|
} else {
|
||||||
|
target.style.display = 'none !important';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
messaging.tell({
|
messaging.tell({
|
||||||
what: 'injectedSelectors',
|
what: 'injectedSelectors',
|
||||||
|
Loading…
Reference in New Issue
Block a user