From 7003fe992fd5709b6b5129cc9dbf1929f724e95b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 1 Dec 2025 10:22:52 +0100 Subject: [PATCH] qutebrowser: Add function to remove floating elements Primarily used to get rid of cookie banners or 'subscribe-to-my-newsletter' annoyances. --- qutebrowser/config/alias.py | 3 +++ qutebrowser/config/config.py | 2 +- qutebrowser/config/maps.py | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/alias.py b/qutebrowser/config/alias.py index f87d6b1..cde8a1f 100644 --- a/qutebrowser/config/alias.py +++ b/qutebrowser/config/alias.py @@ -43,3 +43,6 @@ c.aliases["recent-downloads"] = "spawn --userscript recently-downloaded" # annotate with hypothesis c.aliases["hypothesis"] = "jseval (function(){window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s)})();'hypothesis enabled'" + +# remove any sticky banners (e.g. cookie banners) +c.aliases["remove-floating"] = 'jseval (function(){var i,elements=document.querySelectorAll("body *");for(i=0;i