Greasy Fork is available in English.

KissAnime Anti-Adblock Blocker

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的回應

評論:正評 - 腳本一切正常

§
發表於:2019-07-01
編輯:2019-07-01

[Workaround] Breaks some google-based videos on Kimcartoon

I don't know about the other supported sites as this is the first one I verified this issue on. When this script is running the player on this page fails to load at all. It appears to be hosted on GoogleUserContent but I don't see an iframe for the video to add an exception for. Disabling the script allows the video to play normally.

https://kimcartoon.to/Cartoon/Amethyst-Princess-of-Gemworld/Episode-1-Your-Quest-Begins?id=62599

§
發表於:2019-07-01
編輯:2019-07-01

Found the fix.

Commend out lines 36 and 37. Not sure what they are trying to do but seem to be trying to affect disqus? On Chrome this doesn't seem to do anything. On Firefox it breaks Disqus scripts, breaks GP/GoogleUserContent hosted videos, and the KissGrabber script (which relies on jQuery).

These are the impacted lines...

   if (e.target.src && element_host !== document.domain &&
                       element_host !== document.domain.split('.')[0] + '.disqus.com') e.preventDefault();

I tracked back the code being added on 09-17-2016 to add blockers to it. Ironically enough the changes only worked in Firefox...

§
發表於:2019-07-01

Here is another workaround. Rather than commenting out the above line (apparently it is supposed to prevent cross scripting) add these new lines starting at line 35.

  /* fix for KissGrabber; don't block jquery */
  if (element_host === 'code.jquery.com')
      return;

  /* fix GP/GUC hosted videos */
  if (element_host === 'vjs.zencdn.net')
      return;

This does explain why the original commit indicated why the new code only really works on Firefox. This enhances the code to whitelist those specific sites. The fixes only apply to Firefox browsers for the anti-ad/popup/popunder code.

Swyter作者
§
發表於:2019-07-01

Thanks, done.

發表回覆

登入以回復