Bug #909


Block ads in YouTube videos

Added by Thomas Jensen almost 2 years ago. Updated 12 months ago.

Start date:
Due date:
% Done:


Estimated time:


Privacy Browser doesn't block ads in youtube videos. Opera Browser for android does, and firefox (with adblockers) on my pc does. Is it possible to make Privacy Browser also block these ads?

Actions #1

Updated by Soren Stoutner almost 2 years ago

  • Tracker changed from Feature to Bug
  • Assignee set to Soren Stoutner

I think the core of the problem is that Google is constantly changing the URLs that deliver the ads. Currently, Privacy Browser only updates the blocklists with new releases. There is a planned feature to allow for the automatic update of the blocklists.

My guess is that the issue will be resolved when that is in place, but I will leave this bug report open in case there is something else that is needed.

The following two feature requests could also be of interest to this issue:

Actions #2

Updated by Thomas Jensen almost 2 years ago

Soren Stoutner wrote in #note-1:

Currently, Privacy Browser only updates the blocklists with new releases.

I am not sure update of blocklists is the problem. If you want to, you could report the issue here:, and maybe they will help you.

Actions #3

Updated by Soren Stoutner almost 2 years ago

You may be right. This could be a general deficiency in EasyList, instead of just a changing URL issue. I am unlikely to have the time to chase this down right now as I am spending all of my available time building Privacy Browser PC and won't have the time to investigate the root cause until Privacy Browser PC reaches feature parity with Privacy Browser Android. However, if you would like it done more quickly you can submit an bug to EasyList (or better yet, just describe the problem or submit the fix on their forum at which is their preferred method of communication) and test it out to make sure it works. Then it will flow into Privacy Browser the next time an update is released.

Actions #4

Updated by Soren Stoutner over 1 year ago

  • Subject changed from Blocking ads in youtube videos to Block ads in YouTube videos
  • Priority changed from 3.x to 4.x

I decided to spend some time today trying to narrow down the problem. It turns out that YouTube ads can only be blocked by modifying the JavaScript and JSON on the page.

Specifically, these are the lines in the uBlock filters that do the trick:,,, [].playerResponse.adPlacements [].playerResponse.playerAds playerResponse.adPlacements playerResponse.playerAds adPlacements playerAds),,, ytInitialPlayerResponse.adPlacements, undefined),,, playerResponse.adPlacements, undefined)

The EasyList ad blocking specification does not provide options for modifying JavaScript and JSON. Which is why, if you are running uBlock origin and only enable EasyList and lists that use their specification, it will not block ads on YouTube.

Additionally, the controls that Andorid's WebView provides in this regard are fairly limited, and it would likely not be possible to implement the uBlock specification. That restriction could change with the release of Privacy WebView in the 4.x series.

In the meantime, NewPipe ( does a good job of playing videos from YouTube without showing the ads. If you have NewPipe set as your default YouTube player and visit a YouTube page in Privacy Browser, you can automatically open the video in NewPipe from the options menu by tapping Share > Open with App.

Actions #5

Updated by राही अखेराजोत over 1 year ago [requires javascript] [without javascript]
are good alternatives to YouTube that does not contain ads and analytics.

Actions #6

Updated by Soren Stoutner over 1 year ago is pretty cool! In today's HTML 5 world, there is really no excuse to require JavaScript to play videos.

And, as with all things cool, it is actually a federated service:

Actions #7

Updated by divest os 12 months ago

No other browser have below feature.

1. Add "Redirect" settings page
2. Textbox like

(from) (to)

Actions #8

Updated by Soren Stoutner 12 months ago

The previous comment is probably discussing #502 (see #505 and #844 for additional context).


Also available in: Atom PDF