qutebrowser: YT: click dismissable elements

This removes ads for Youtube Premium and also the Youtube Shorts shelf
(which is garbage anyways)
This commit is contained in:
Alexander Bocken 2024-03-04 09:12:00 +01:00
parent 6892176569
commit a5c1ad6af0
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name Auto Remove Ads // @name Auto Remove Ads
// @version 1.0.1 // @version 1.0.2
// @description Autoremove static ads // @description Autoremove static ads
// @author Alexander Bocken // @author Alexander Bocken
// @match *://*.youtube.com/* // @match *://*.youtube.com/*
@ -11,4 +11,5 @@ setInterval(() => {
el => { el => {
el.remove(); el.remove();
}) })
document.querySelectorAll('[aria-label="Not interested"]').forEach(el => { el.click() })
}, 50) }, 50)