1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00

#789: code review: even simpler, just check parent node

This commit is contained in:
gorhill 2015-02-14 12:32:14 -05:00
parent 21ea1a6e03
commit 9d76974710

View File

@ -71,8 +71,9 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
if ( vAPI.specificHideStyle instanceof HTMLStyleElement === false ) {
return;
}
// Is our style tag still available?
if ( document.getElementById('ublock-preload-1ae7a5f130fc79b4fdb8a4272d9426b5') !== null ) {
// Is our style tag still in the DOM? (the guess is whatever parent there
// is, it is in the DOM)
if ( vAPI.specificHideStyle.parentNode !== null ) {
return;
}
// Put it back