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