From 8a39d8d18e2376d29d67db9e84e908cd86bd078a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Tue, 26 Jan 2021 05:31:06 +0300 Subject: I hate the modern web --- dotfiles/.config/qutebrowser/config.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dotfiles/.config/qutebrowser/config.py b/dotfiles/.config/qutebrowser/config.py index 79d35e2..0ce4dc7 100644 --- a/dotfiles/.config/qutebrowser/config.py +++ b/dotfiles/.config/qutebrowser/config.py @@ -1,3 +1,5 @@ +import subprocess + # Uncomment this to still load settings configured via autoconfig.yml config.load_autoconfig() @@ -56,8 +58,18 @@ for site in js_whitelist: ## Disable 3rd party cookies c.content.cookies.accept = "no-3rdparty" -## Pretend that we are Chrome -c.content.headers.user_agent = "Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}" +# Pretend that we are the latest version of Chrome, since some retarded sites +# think it is fine to pester me with ads to install Firefox or Chrome or +# whatever upon seeing a non-standard user agent string. I swear the web is just +# getting worse day by day. Just when you think it can't get worse they come up +# with some new crap worse than anything else before. Why can't a person just +# browse the web peacefully, reading content without being annoyed by ads, +# spyware, pop ups and broken javascript written by soydevs that don't know how +# to make a proper website without adding a ton of javascript, or at least +# degrade gracefully if the latest webshit "standard" isn't being used because I +# don't want my web browser to be a second OS on top of my actual OS. +chrome_ver = subprocess.check_output("pacman -Si chromium | grep Version | sed 's/^.*: \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*$/\\1/g'", shell=True).decode('ascii').rstrip() +c.content.headers.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{0} Safari/537.36".format(chrome_ver) ## Downloads -- cgit v1.2.3