summaryrefslogtreecommitdiff
path: root/qutebrowser/.config
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/.config')
-rw-r--r--qutebrowser/.config/qutebrowser/config.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py
index aa447b9..f1b72c7 100644
--- a/qutebrowser/.config/qutebrowser/config.py
+++ b/qutebrowser/.config/qutebrowser/config.py
@@ -2,6 +2,19 @@
# qute://help/configuring.html
# qute://help/settings.html
+from qutebrowser.api import interceptor
+
+
+def filter_yt(info: interceptor.Request):
+ url = info.request_url
+ if (url.host() == 'www.youtube.com'
+ and url.path() == '/get_video_info'
+ and '&adformat=' in url.query()):
+ info.block()
+
+
+interceptor.register(filter_yt)
+
c.content.images = True
c.downloads.location.prompt = False
c.editor.command = ['urxvt', '-e', 'nvim', '-f', '{}']