1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-11-10 23:28:51 +01:00

MutationObserver failed in some instances

Fixes #354
This commit is contained in:
kkapsner 2019-05-29 20:48:56 +02:00
parent 46ba7c666b
commit 579b778062
2 changed files with 6 additions and 2 deletions

View File

@ -123,8 +123,11 @@
var observer = new MutationObserver(allCallback); var observer = new MutationObserver(allCallback);
var observing = false; var observing = false;
function observe(){ function observe(){
if (!observing){ if (
observer.observe(window.document.documentElement, {subtree: true, childList: true}); !observing &&
window.document
){
observer.observe(window.document, {subtree: true, childList: true});
observing = true; observing = true;
} }
} }

View File

@ -12,6 +12,7 @@ Version 0.5.10:
- not connected iFrame threw error with persistent rng - not connected iFrame threw error with persistent rng
- detection over document.write and document.writeln was possible - detection over document.write and document.writeln was possible
- google docs were broken in Waterfox - google docs were broken in Waterfox
- MutationObserver failed in some instances
known issues: known issues:
- if a data URL is blocked the page action button does not appear - if a data URL is blocked the page action button does not appear