Disable YouTube Video Ads

Disable YouTube video & screen based ads at home page, and right before or in the middle of the main video playback. Also disable YouTube's anti-adblocker popup dialog. For new YouTube layout (Polymer) only.

< Feedback on Disable YouTube Video Ads

Review: Good - script works

§
Posted: 2021-06-26
Edited: 2021-06-26

Hello @jcunews,

I'm another FireMonkey' user experiencing small issues with your wonderful disable-youtube-video-ads script.
I'm using Firefox Nightly and for long time your script worked flawlessly along FireMonkey (as @lepefe said yesterday, your script just need a small hack at line 16: fn = (a) => {) with: fn = (a) => { let fn, ipse, haia, hca, rpo, et;

Sadly days ago something changed and your script now is not working perfectly as it used to work.
The YouTube page is loading perfectly.
Also, ads are blocked.
But 50% of the time, before the video starting, an ad image appears (just the ad image). If you press "play", no ads, and the youtube video starts directly.

During the last year FireMonkey extension incorporated lot of improvements, updates and upgrades. And the FireMonkey developer is a very nice person, very responsive, always trying to help. So I opened an issue at his GitHub. Please @jcunews, the FireMonkey dev has two questions for you. I quote:
1) With regards to code line 323: Which "partial compatibility to GreaseMonkey specification" does the author refer to regarding the script?
2) Is the script meant to run in page context?

@jcunews It'll be great if you can give us a hand helping us to find the issue.
The goal is to make FireMonkey capable to run all your wonderful js scripts.

Thank you in advance!

jcunewsAuthor
§
Posted: 2021-06-27
Edited: 2021-06-27

Acknowledged. The script has been updated.

Answer to the questions:

  1. The FireMonkey compatibility code is needed since scripts run by FireMonkey are run not in page context, by default.

  2. The script is meant to be run in page context. In fact, GM scripts are supposed to run in page context - whether it's in a sandbox or not. This part is where FireMonkey is not compatible with GreaseMonkey's specification.

These... at least, when I initially created this script. I haven't checked the implementation of FireMonkey since then, since my main GM provider addon is TamperMonkey - and there hasn't been any FireMonkey related problem reported until now.

Post reply

Sign in to post a reply.