Qutebrowser config
This commit is contained in:
parent
72dbe8ae20
commit
83268798a6
|
@ -0,0 +1,34 @@
|
|||
from qutebrowser.api import interceptor
|
||||
|
||||
|
||||
# Youtube Ad Blocker
|
||||
# From: https://gist.github.com/Gavinok/f9c310a66576dc00329dd7bef2b122a1
|
||||
|
||||
def filter_youtube_ads(info: interceptor.Request):
|
||||
"""Block the given request if necessary."""
|
||||
url = info.request_url
|
||||
# Video ads
|
||||
if (
|
||||
url.host() == "www.youtube.com"
|
||||
and url.path() == "/get_video_info"
|
||||
and "&adformat=" in url.query()
|
||||
):
|
||||
info.block()
|
||||
|
||||
|
||||
interceptor.register(filter_youtube_ads)
|
||||
|
||||
# Session save/restore
|
||||
c.auto_save.session = True
|
||||
c.auto_save.interval = 15000
|
||||
|
||||
# Search engines
|
||||
c.url.searchengines = {
|
||||
'DEFAULT': 'https://google.com/search?hl=en&q={}',
|
||||
'!a': 'https://www.amazon.es/s?k={}',
|
||||
'!gh': 'https://github.com/search?o=desc&q={}&s=stars',
|
||||
}
|
||||
|
||||
# Default page and new tab
|
||||
c.url.default_page = "https://miniflux.fmartingr.dev"
|
||||
c.url.start_pages = ["https://miniflux.fmartingr.dev"]
|
|
@ -0,0 +1,4 @@
|
|||
disc https://discord.com/channels/@me
|
||||
gh https://github.com/
|
||||
yt https://www.youtube.com/
|
||||
tw https://twitter.com/
|
Loading…
Reference in New Issue