Not even the people from Easylist seem to fight this site anymore, someone had to try as this looks popular enough. *sigh*
< Σχολιασμός για τον κώδικα KissAnime Anti-Adblock Blocker
Thanks for the feedback, I'll give it a go. Which script manager are you using?
I'm using tampermonkey on both firefox and chrome
Give it another go when you can.
The script works almost perfect now!
The only thing that I would change is to place the XMLHttpRequest handler before the DOMContentLoaded event, because I just noticed that some requests activated before you removed the DOM-element. You should also copy-paste the beforescriptexecute behavior that only works in Firefox inside the XMLHttpRequest handler so that it also works for Chrome: https://pastebin.com/hKbL0UEU
I also found a new iframe element with selector: iframe[src*='check.aspx']
Script problems + possible solutions
First of all, thank you for making this script! Kissanime is way more responsive thanks to this script.
I've been using this script for a long time and haven't had any problems with it until a month ago. I also noticed that other Chrome users had problems so I decided to take a look at what was happening.
First problem:
This error only happened when using Ublock Origin. The same problem happened in Firefox.
Because of this error, the "removing cruft" part of the code didn't run...
Adding a try catch fixed this:
try {
//override the check in Chrome and call it a day
Object.defineProperty(window, 'DoDetect2', {
configurable: false,
writable: false,
value: function()
{
console.info('[/] check overriden!');
}
});
} catch(e) {
console.log('failed to define property "DoDetect2"');
}
Second problem:
The "beforescriptexecute" event only works in firefox. Ad popups still happen for other browser users.
These popups only seem to happen because of inline javascript. Adding the selector "body > script[src],script[data-cfasync]" into the removing cruft querySelector seems to be an easy solution.
-------------
Thanks again for this script and I hope that you can use this feedback to fix some problems!