Closed mohe2015 closed 5 years ago
This is done by #3
This issue is generally because content scripts are only run once afaik. Maybe we can subscribe to some dom ready event of the site(s)
This issue is generally because content scripts are only run once afaik. Maybe we can subscribe to some dom ready event of the site(s) @RaisingAgent https://github.com/dieparteidiepartei/afd-blocker-plugin/commit/85179414bc8c0581d5f3c6d215b318b0a4ed151f#diff-22a7ffd3af499eb889e92ff609c54934R106 I used a mutation observer.
Hey,
could you deactivate the observer while running addBlocker
?
@mohe2015 slighty off topic, but i'm curious. Does var self = this;
keep the this of the outer scope, whilst this would refer to the current scope in watchPageForMutations()
. (i've used that before, but I don't think it makes a difference)
@RaisingAgent I'm not a JavaScript expert but I think otherwise this
refers to the scope of the MutationObserver.
Example page: https://www.sueddeutsche.de/news?search (after https://github.com/dieparteidiepartei/afd-blocker-plugin/pull/3 would be merged)