Advice Request How do you remove YT ads and google consent cookies options with UBo?

Please provide comments and solutions that are helpful to the author of this topic.

floalma

Level 4
Thread author
Verified
Apr 5, 2015
182
Hi,
Since a few days, I got on google.com, this damned google consent for cookies options windows appearing and I can't remove with UBO in firefox.

I tried different filters lists and also tried with the zapper mode and picker mode without success.

The same with Youtube ads, I can't remove them. I really appreciated your help to fix theses issues. Thanks !
 

Attachments

  • google.png
    google.png
    137.9 KB · Views: 623
  • filter list.png
    filter list.png
    103.8 KB · Views: 676
Last edited:

Terry Ganzi

Level 26
Verified
Top Poster
Well-known
Feb 7, 2014
1,540
@Terry Ganzi

I've just tried your UBO and UM settings for youtube.

About Youtube with your settings :

1. ads images don't appears but the ads is still alive with a countdown timer appears at the left bottom of the video
2.I noticed that the the thumbnails of the videos from the suggestion list have disappeared.
3.No results displayed when making a YT search


Questions about UM:
1.All, cookie, image, media, script, XHR (fetch in your UM version), frame and other are always in RED, is this settings for all the sites and then you unblock what you need for your own purposes ?

2.For me RED means block, you said I have to allow images but I can see that for youtube, you block images too, by default, then you unblock the ones you need it ?

PS: See my Adblock tester with my customized settings before modifying with your settings.

@rain2reign I will try it

The answer is yes to your questions. After you configured ublock and umatrix then it was my job to help you with filters and to check over you config to make sure everything was right, I was hoping to catch you when you was writing your last post but it is what it is champ.
 

floalma

Level 4
Thread author
Verified
Apr 5, 2015
182
But what about the following ?

About Youtube with your settings :

1. ads images don't appears but the ads is still alive with a countdown timer appears at the left bottom of the video
2.I noticed that the the thumbnails of the videos from the suggestion list have disappeared.
3.No results displayed when making a YT search

The answer is yes to your questions. After you configured ublock and umatrix then it was my job to help you with filters and to check over you config to make sure everything was right, I was hoping to catch you when you was writing your last post but it is what it is champ.
 

Lenny_Fox

Level 22
Verified
Top Poster
Well-known
Oct 1, 2019
1,120
@floalma

I am using uBlock)rigin again with these My Rules for Youtube.com. I get an invideo prompt to skip the ads (until now)
_____________________________________My Filters ___________________________________________________
! youtube.com
||youtube.com/ad_companion
||youtube.com/get_midroll_
||youtube.com/get_video_info?$~third-party
||youtube.com/pagead/
||youtube.com/subscribe_embed?$third-party
||youtube.com/subscribe_widget$third-party
||ytimg.com^*/new_watch_background.jpg?$domain=youtube.com
||ytimg.com^*/new_watch_background_*.jpg?$domain=youtube.com
||ytimg.com^*_banner$domain=youtube.com
*_ad_$media,third-party,domain=youtube.com
! already blocked by Kees1958 TOP500 ||google.com/pagead/$domain=youtube.com
! already blocked by Kees1958 TOP500 ||googlesyndication.com/pagead/$domain=youtube.com
! already blocked by Kees1958 TOP500 ||pagead2.googlesyndication.com$domain=youtube.com
! already blocked by Kees1958 TOP500 ||googleads.g.doubleclick.net$domain=youtube.com
! already blocked by Kees1958 TOP500 ||static.doubleclick.net$domain=youtube.com
________________________________________________________________________________________________
The only blocklist I am using is Kees1958 Top500, when you don't use Kees1958 TOP500 remove all characters until ||

I have disabled cosmetic filtering and am using easy-medium mode of Windows_Security (aka Kees1958)
_________________________________ My Rules _________________________________________________________________
no-cosmetic-filtering: * true
* * * noop
* * 3p-frame block
* * 3p-script block
* com * noop
* io * noop
* net * noop
* nl * noop
* org * noop
* uk * noop
 
Last edited:

rain2reign

Level 8
Verified
Well-known
Jun 21, 2020
363
Forgot to mention it a few days ago, but i managed to reduce the filters from 5 lines (as in Post #19, page 1) down to three for anyone interested.

Code:
! Google - hide consent popup notice and restores scroll function across all Google TLD's.
google.*##div[jsname="XKSfm"][jsaction="dBhwS:TvD9Pc;mLt3mc"]
google.*##html:style(overflow: visible !important;)
google.*##.widget-consent-fullscreen.widget-consent
 

Lenny_Fox

Level 22
Verified
Top Poster
Well-known
Oct 1, 2019
1,120

ErzCrz

Level 21
Verified
Top Poster
Well-known
Aug 19, 2019
1,003
Enhancer for Youtube addon is helpful keeping ads down and a number of other tweaks on YT.

Alternatively, a mate gave me the following My Filters coding for YT ads but I've yet to try it out myself:

youtube.com###masthead-ad
youtube.com##.ytd-promoted-sparkles-web-renderer.style-scope
youtube.com##+js(set-constant, playerResponse.adPlacements, undefined)
youtube.com##+js(set-constant, ytInitialPlayerResponse.adPlacements, undefined)
youtube.com##+js(json-prune, [].playerResponse.adPlacements [].playerResponse.playerAds playerResponse.adPlacements playerResponse.playerAds adPlacements playerAds)
youtube.com##ytd-companion-slot-renderer.ytd-player-legacy-desktop-watch-ads-renderer.style-scope
www.youtube.com##ytd-popup-container.ytd-app.style-scope
||pagead2.googlesyndication.com/pagead/js/adsbygoogle.js$script,domain=www.arcai.com,redirect=noop.js
[at][at]||youtube.com/get_video_info
||youtube.com/ad_companion
||youtube.com/get_midroll_
||youtube.com/get_video_info?$~third-party
||youtube.com/pagead/
||youtube.com/subscribe_embed?$third-party
||youtube.com/subscribe_widget$third-party
||ytimg.com^*/new_watch_background.jpg?$domain=youtube.com
||ytimg.com^*/new_watch_background_*.jpg?$domain=youtube.com
||ytimg.com^*_banner$domain=youtube.com
*_ad_$media,third-party,domain=youtube.com
/.*instream.*/$domain=youtube.com
/.*midroll.*/$domain=youtube.com
||youtube.com/*/scheduler.js$script
||youtube.com/ptracking
||youtube.com/api/stats
||youtube.com/youtubei
youtube.com##+js(json-prune, adPlacements)
 
Last edited by a moderator:

Marko :)

Level 20
Verified
Top Poster
Well-known
Aug 12, 2015
954
I sort of collect the tips from members of this forum (thanks @venustus @Jan Willy @rain2reign and others I forgot to mention) and make them available on github.

For uBlockOrigin: https://raw.githubusercontent.com/LennyFox/Blocklists/master/Popular websites uBO

For AdGuard: https://raw.githubusercontent.com/LennyFox/Blocklists/master/Popular websites AG

You also need to block cookies in the browser(only works with chromium based browsers)

View attachment 256724
I'd advise against doing that because it breaks website functionality. If you block consent.youtube.com cookies, comment section and menus will be broken. Much better solution is to use Violentmonkey and user script called Google Shut Up!.

I've been using this user script since yesterday and it works great. It also works in all browsers whilst blocking cookies only works in Chromium browsers.
 

Lenny_Fox

Level 22
Verified
Top Poster
Well-known
Oct 1, 2019
1,120
I'd advise against doing that because it breaks website functionality. If you block consent.youtube.com cookies, comment section and menus will be broken. Much better solution is to use Violentmonkey and user script called Google Shut Up!.

I've been using this user script since yesterday and it works great. It also works in all browsers whilst blocking cookies only works in Chromium browsers.
OKay it is good to have an alternative when you are on Firefox, thank you for mentioning this solution. Downside is that I have to add a another extension (add-on) to run user scripts (like tampermonkey or greasemonkey). I like my extensions to keep to a minimum (for obvious reasons like attack surface increase) and there are some doubts about running user scripts ("Firefox add-on lets surfers tweak sites, but is it safe?").

I have not ran into website functionality breaking, so I will stick to blocking cookies in the browser.

Do you know which websites break when blocking the consent cookies of Google?

1618075211755.png
 
Last edited:

Lenny_Fox

Level 22
Verified
Top Poster
Well-known
Oct 1, 2019
1,120
Enhancer for Youtube addon is helpful keeping ads down and a number of other tweaks on YT.

Alternatively, a mate gave me the following My Filters coding for YT ads but I've yet to try it out myself:


youtube.com###masthead-ad
youtube.com##.ytd-promoted-sparkles-web-renderer.style-scope
youtube.com##+js(set-constant, playerResponse.adPlacements, undefined)
youtube.com##+js(set-constant, ytInitialPlayerResponse.adPlacements, undefined)
youtube.com##+js(json-prune, [].playerResponse.adPlacements [].playerResponse.playerAds playerResponse.adPlacements playerResponse.playerAds adPlacements playerAds)
youtube.com##ytd-companion-slot-renderer.ytd-player-legacy-desktop-watch-ads-renderer.style-scope
www.youtube.com##ytd-popup-container.ytd-app.style-scope
||pagead2.googlesyndication.com/pagead/js/adsbygoogle.js$script,domain=www.arcai.com,redirect=noop.js
[at][at]||youtube.com/get_video_info
||youtube.com/ad_companion
||youtube.com/get_midroll_
||youtube.com/get_video_info?$~third-party
||youtube.com/pagead/
||youtube.com/subscribe_embed?$third-party
||youtube.com/subscribe_widget$third-party
||ytimg.com^*/new_watch_background.jpg?$domain=youtube.com
||ytimg.com^*/new_watch_background_*.jpg?$domain=youtube.com
||ytimg.com^*_banner$domain=youtube.com
*_ad_$media,third-party,domain=youtube.com
/.*instream.*/$domain=youtube.com
/.*midroll.*/$domain=youtube.com
||youtube.com/*/scheduler.js$script
||youtube.com/ptracking
||youtube.com/api/stats
||youtube.com/youtubei
youtube.com##+js(json-prune, adPlacements)
I tried them, but the grey overlay is not removed.
 

rain2reign

Level 8
Verified
Well-known
Jun 21, 2020
363
I'd advise against doing that because it breaks website functionality. If you block consent.youtube.com cookies, comment section and menus will be broken. Much better solution is to use Violentmonkey and user script called Google Shut Up!.

I've been using this user script since yesterday and it works great. It also works in all browsers whilst blocking cookies only works in Chromium browsers.
Exactly. Better yet, if you have a need or want to use (on firefox) Multi-Account Containers, or other container based addons, that your tab gets permanently destroyed alongside its history and cookie data. I do use it though Its nothing setup breaking for me, but I can imagine for some folks that do need that data but isolated for multi-account purposes to be extremely annoying and frustrating.

Enhancer for Youtube addon is helpful keeping ads down and a number of other tweaks on YT.

Alternatively, a mate gave me the following My Filters coding for YT ads but I've yet to try it out myself:


youtube.com###masthead-ad
youtube.com##.ytd-promoted-sparkles-web-renderer.style-scope
youtube.com##+js(set-constant, playerResponse.adPlacements, undefined)
youtube.com##+js(set-constant, ytInitialPlayerResponse.adPlacements, undefined)
youtube.com##+js(json-prune, [].playerResponse.adPlacements [].playerResponse.playerAds playerResponse.adPlacements playerResponse.playerAds adPlacements playerAds)
youtube.com##ytd-companion-slot-renderer.ytd-player-legacy-desktop-watch-ads-renderer.style-scope
www.youtube.com##ytd-popup-container.ytd-app.style-scope
||pagead2.googlesyndication.com/pagead/js/adsbygoogle.js$script,domain=www.arcai.com,redirect=noop.js
[at][at]||youtube.com/get_video_info
||youtube.com/ad_companion
||youtube.com/get_midroll_
||youtube.com/get_video_info?$~third-party
||youtube.com/pagead/
||youtube.com/subscribe_embed?$third-party
||youtube.com/subscribe_widget$third-party
||ytimg.com^*/new_watch_background.jpg?$domain=youtube.com
||ytimg.com^*/new_watch_background_*.jpg?$domain=youtube.com
||ytimg.com^*_banner$domain=youtube.com
*_ad_$media,third-party,domain=youtube.com
/.*instream.*/$domain=youtube.com
/.*midroll.*/$domain=youtube.com
||youtube.com/*/scheduler.js$script
||youtube.com/ptracking
||youtube.com/api/stats
||youtube.com/youtubei
youtube.com##+js(json-prune, adPlacements)
I just checked for the hell of it in the following filters (in uBlock Origin):
  • AdGaurd Base (without EasyList)
  • EasyList
  • AdGuard Annoyances
  • uBlock Filters
  • Fanboy's Annoyances
  • NOT FILTER: URL- solutions - uBlockOrigin From which I only use the 'Consent' and 'Login' Dialog filter rules.
Fanboy was checked last and used cross-reference as it's known to be a bit more aggressive than the others (as a last resort second opinion).

- AdGuard Base (without Easylist)
youtube.com##+js(set-constant, playerResponse.adPlacements, undefined)​
youtube.com##+js(set-constant, ytInitialPlayerResponse.adPlacements, undefined)​

- Easylist
youtube.com###masthead-ad​
/.*midroll.*/$domain=youtube.com​
||youtube.com/pagead/​
||youtube.com/get_video_info?$~third-party​
||youtube.com/get_midroll_​
||youtube.com/ad_companion​
@@||youtube.com/get_video_info​
youtube.com##ytd-companion-slot-renderer.ytd-player-legacy-desktop-watch-ads-renderer.style-scope​
! May contain multiple instances in various ways. As both a global rule, as well as, specific URL rulestypes (Just no YouTube specific rules).​
/.*instream.*/$domain=youtube.com​
||ytimg.com^*_banner$domain=youtube.com​
*_ad_$media,third-party,domain=youtube.com​

- AdGuard Annoyances
[none]​

- uBlock Filters
youtube.com##+js(json-prune, [].playerResponse.adPlacements [].playerResponse.playerAds playerResponse.adPlacements playerResponse.playerAds adPlacements playerAds)​

- uBlock Origin Annoyances
! Rule is part of a more specific rule and may not count(?).​

- Fanboy's Annoyances
||youtube.com/subscribe_embed?$third-party​
||youtube.com/subscribe_widget$third-party​
||youtube.com/youtubei​

- Not included in any of the checked filters.
||pagead2.googlesyndication.com/pagead/js/adsbygoogle.js$script,domain=www.arcai.com,redirect=noop.js​
youtube.com##.ytd-promoted-sparkles-web-renderer.style-scope​
||ytimg.com^*/new_watch_background.jpg?$domain=youtube.com​
||ytimg.com^*/new_watch_background_*.jpg?$domain=youtube.com​
||youtube.com/*/scheduler.js$script​
||youtube.com/ptracking​
||youtube.com/api/stats​
youtube.com##+js(json-prune, adPlacements)​

OKay it is good to have an alternative when you are on Firefox, thank you for mentioning this solution. Downside is that I have to add a another extension (add-on) to run user scripts (like tampermonkey or greasemonkey). I like my extensions to keep to a minimum (for obvious reasons like attack surface increase) and there are some doubts about running user scripts ("Firefox add-on lets surfers tweak sites, but is it safe?").

I have not ran into website functionality breaking, so I will stick to blocking cookies in the browser.

Do you know which websites break when blocking the consent cookies of Google?
Block consent.youtube.com cookie breaks YouTube comments, and I am not sure whatever else, as I am never logged in whenever I have a need to use it. Block consent.google.com cookie and ||consent.google.com^ filter breaks initial Google Maps, -news, -shopping, -Books tabs as far as I know. Removing the ||consent... filter lets you access them without uBlock bugging you, but you still need to block the cookie for the consent redirect.
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top