1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-16 20:02:47 +00:00
dotfiles/.config/qutebrowser/config.py

16 lines
387 B
Python

config.load_autoconfig()
from qutebrowser.api import interceptor
# Youtube adblock
def filter_yt(info: interceptor.Request):
"""Block the given request if necessary."""
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)