## Remove it to not load settings done via the GUI.
config.load_autoconfig()
+try:
+ from qutebrowser.api import interceptor, message
+ from PyQt5.QtCore import QUrl
+
+ def intercept(info: interceptor.Request):
+ url = info.request_url
+ if url.host() == "twitter.com":
+ url.setHost("nitter.net")
+ message.info("Redirecting to " + url.toString())
+ info.redirect(url)
+ if url.host() == "xkcd.com":
+ url.setHost("m.xkcd.com")
+ message.info("Redirecting to " + url.toString())
+ info.redirect(url)
+ if url.host() == "www.bristolpost.co.uk":
+ url.setUrl("https://outline.com/" + url.toString())
+ message.info("Redirecting to " + url.toString())
+ info.redirect(url)
+
+ interceptor.register(intercept)
+except ImportError:
+ pass
+
## Aliases for commands. The keys of the given dictionary are the
## aliases, while the values are the commands they map to.
## Type: Dict
# config.bind('sk', 'set-cmd-text -s :bind')
# config.bind('sl', 'set-cmd-text -s :set -t')
# config.bind('ss', 'set-cmd-text -s :set')
-config.bind('tCH', 'spawn --userscript config-cycle-tld -p content.cookies.accept no-3rdparty never;; reload')
config.bind('tCh', 'spawn --userscript config-cycle-tld -p content.cookies.accept no-3rdparty never;; reload')
-config.bind('tcH', 'spawn --userscript config-cycle-tld -p -t content.cookies.accept no-3rdparty never;; reload')
config.bind('tch', 'spawn --userscript config-cycle-tld -p -t content.cookies.accept no-3rdparty never;; reload')
config.bind('tGh', 'spawn --userscript config-cycle-tld -p content.geolocation ;; reload')
config.bind('tgh', 'spawn --userscript config-cycle-tld -p -t content.geolocation ;; reload')