YouTube now has an annoying pop-up that keeps popping up and asking you to disable advertisement blockers.
This filter code for uBlock Origin will block this pop-up, but it stops scrolling on the page afterwards. This isn’t very pleasant but I guess having the ability to play videos still is fine.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ! 2023-09-10 https://www.youtube.com www.youtube.com###offer-module www.youtube.com###guide-button www.youtube.com##.opened www.youtube.com##tp-yt-paper-dialog.ytd-popup-container.style-scope youtube.com##+js(set, yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel, false) youtube.com##+js(set, Object.prototype.adBlocksFound, 0) youtube.com##+js(set, ytplayer.config.args.raw_player_response.adPlacements, []) youtube.com##+js(set, Object.prototype.hasAllowedInstreamAd, true) www.youtube.com##.opened www.youtube.com##tp-yt-paper-dialog.ytd-popup-container.style-scope > .ytd-popup-container.style-scope ##.ytp-endscreen-content youtube.com##.ytp-scroll-min.ytp-pause-overlay youtube.com##.ytp-ce-covering-shadow-top youtube.com##.ytp-pause-overlay youtube.com##.ytp-ce-covering-overlay youtube.com##.ytp-ce-element |
This will block the annoying pop-up anyway.
![Annoying pop-up on YouTube. This is aggravating.](https://www.securitronlinux.com/wp-content/uploads/2023/10/blocker.webp)
Another thing to try is to go to Dashboard->Settings in uBlock Origin, then ‘Filter lists’, and click Purge all caches. Once that completes, click ‘Update now’. This will forcibly update all filter lists.
![Updating uBlock Origin filter lists.](https://www.securitronlinux.com/wp-content/uploads/2023/10/filters-590x720.png)
These tips might or might not work. But give it a go and see if it helps.
Here is the HTML of the pop-up element from the Chrome inspector in Microsoft Edge.
<tp-yt-paper-dialog style-target="host" role="dialog" tabindex="-1" class="style-scope ytd-popup-container" prevent-autonav="true" style="outline: none; z-index: 2202; position: fixed; top: 419.5px; left: 421.5px; box-sizing: border-box; max-height: 1260px; max-width: 1643px;"><!--css-build:shady--><ytd-enforcement-message-view-model class="style-scope ytd-popup-container" tabindex="-1" style="outline: none;"><!--css-build:shady--><!--css-build:shady--><div id="container" class="style-scope ytd-enforcement-message-view-model"> <div id="header" class="style-scope ytd-enforcement-message-view-model"> <yt-image id="logo-icon" height="24" preserve-height="" class="style-scope ytd-enforcement-message-view-model"><img alt="" height="24" class="yt-core-image--fill-parent-width yt-core-image yt-core-image--content-mode-scale-aspect-fill yt-core-image--loaded" src="https://www.gstatic.com/youtube/img/promos/growth/7a4b9bd20cc245474ee2f5fa265c92410480b3e49f72a5342ccfeeb442905946_318x72.png"></yt-image> <yt-button-view-model id="dismiss-button" class="style-scope ytd-enforcement-message-view-model" icon="CLOSE"><button-view-model class="yt-spec-button-view-model"><button class="yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button" aria-label="Close" title="" style=""><div class="yt-spec-button-shape-next__icon" aria-hidden="true"><yt-icon class="undefined" style="width: 24px; height: 24px;"><!--css-build:shady--><!--css-build:shady--><yt-icon-shape class="style-scope yt-icon"><icon-shape class="yt-spec-icon-shape"><div style="width: 100%; height: 100%; fill: currentcolor;"><svg enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24" focusable="false" style="pointer-events: none; display: block; width: 100%; height: 100%;"><path d="m12.71 12 8.15 8.15-.71.71L12 12.71l-8.15 8.15-.71-.71L11.29 12 3.15 3.85l.71-.71L12 11.29l8.15-8.15.71.71L12.71 12z"></path></svg></div></icon-shape></yt-icon-shape></yt-icon></div><yt-touch-feedback-shape style="border-radius: inherit;"><div class="yt-spec-touch-feedback-shape yt-spec-touch-feedback-shape--touch-response" aria-hidden="true"><div class="yt-spec-touch-feedback-shape__stroke" style=""></div><div class="yt-spec-touch-feedback-shape__fill" style=""></div></div></yt-touch-feedback-shape></button></button-view-model></yt-button-view-model> </div> <div id="header-image" class="style-scope ytd-enforcement-message-view-model" hidden=""> <yt-image height="64" preserve-height="" class="style-scope ytd-enforcement-message-view-model"></yt-image> </div> <div id="title" class="style-scope ytd-enforcement-message-view-model"> <yt-attributed-string class="style-scope ytd-enforcement-message-view-model"><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text"><span class="" style="">Ad blockers are not allowed on YouTube</span></span></yt-attributed-string> </div> <ul id="body" class="style-scope ytd-enforcement-message-view-model"> <li class="style-scope ytd-enforcement-message-view-model"> <yt-attributed-string class="body-message style-scope ytd-enforcement-message-view-model"><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text"><span class="" style="">It looks like you may be using an ad blocker.</span></span></yt-attributed-string> </li> <li class="style-scope ytd-enforcement-message-view-model"> <yt-attributed-string class="body-message style-scope ytd-enforcement-message-view-model"><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text"><span class="" style="">Ads allow YouTube to be used by billions worldwide.</span></span></yt-attributed-string> </li> <li class="style-scope ytd-enforcement-message-view-model"> <yt-attributed-string class="body-message style-scope ytd-enforcement-message-view-model"><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text"><span class="" style="">You can go ad-free with YouTube Premium, and creators can still get paid from your subscription.</span></span></yt-attributed-string> </li> <dom-repeat as="item" class="style-scope ytd-enforcement-message-view-model"><template is="dom-repeat"></template></dom-repeat> </ul> <div id="buttons" class="style-scope ytd-enforcement-message-view-model"> <yt-button-view-model class="action-button style-scope ytd-enforcement-message-view-model"><button-view-model class="yt-spec-button-view-model"><button class="yt-spec-button-shape-next yt-spec-button-shape-next--filled yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m" aria-label="Allow YouTube Ads" title="" style=""><div class="yt-spec-button-shape-next__button-text-content">Allow YouTube Ads</div><yt-touch-feedback-shape style="border-radius: inherit;"><div class="yt-spec-touch-feedback-shape yt-spec-touch-feedback-shape--touch-response-inverse" aria-hidden="true"><div class="yt-spec-touch-feedback-shape__stroke" style=""></div><div class="yt-spec-touch-feedback-shape__fill" style=""></div></div></yt-touch-feedback-shape></button></button-view-model></yt-button-view-model> <yt-button-view-model class="action-button style-scope ytd-enforcement-message-view-model" dialog-dismiss=""><button-view-model class="yt-spec-button-view-model"><a class="yt-spec-button-shape-next yt-spec-button-shape-next--tonal yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m" aria-label="Try YouTube Premium" title="" href="/premium" rel="nofollow noopener" target="" force-new-state="true" style=""><div class="yt-spec-button-shape-next__button-text-content">Try YouTube Premium</div><yt-touch-feedback-shape style="border-radius: inherit;"><div class="yt-spec-touch-feedback-shape yt-spec-touch-feedback-shape--touch-response" aria-hidden="true"><div class="yt-spec-touch-feedback-shape__stroke" style=""></div><div class="yt-spec-touch-feedback-shape__fill" style=""></div></div></yt-touch-feedback-shape></a></button-view-model></yt-button-view-model> </div> <div id="divider" class="style-scope ytd-enforcement-message-view-model"></div> <div id="feedback" class="style-scope ytd-enforcement-message-view-model"> <yt-attributed-string id="feedback-message" class="style-scope ytd-enforcement-message-view-model"><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="" style="">Not using an ad blocker? </span><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(62, 166, 255);"><a class="yt-core-attributed-string__link yt-core-attributed-string__link--display-type yt-core-attributed-string__link--call-to-action-color" tabindex="0" role="button" href="javascript:void(0);">Report issue</a></span></span></yt-attributed-string> </div> </div></ytd-enforcement-message-view-model> </tp-yt-paper-dialog> |
This is the CSS class.
class="style-scope ytd-popup-container" |
Therefore, this simple uBlock Origin class will block the pop-up element and a full-page element behind it that blocks the YouTube page.
! 2023-10-16 https://www.youtube.com www.youtube.com##tp-yt-paper-dialog.ytd-popup-container.style-scope www.youtube.com##.opened www.youtube.com##.tp-yt-iron-overlay-backdrop |
I still can not find the script that is preventing page scrolling, but this is as far as I could get.