Script problems + possible solutions

About: KissAnime Anti-Adblock Blocker
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() {'[/] 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!


  • 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:

    I also found a new iframe element with selector: iframe[src*='check.aspx']
Connectez-vous ou Inscrivez-vous pour répondre.