qutebrowser: Add hypothesis annotation function

Can be activated through the command alias ':hypothesis' or just the
shortcut `<localleader>+a`, so `,a`.
This commit is contained in:
Marty Oehme 2025-03-16 10:01:14 +01:00
parent 930cbbc47c
commit 5f6627e7e7
Signed by: Marty
GPG key ID: 4E535BC19C61886E
2 changed files with 4 additions and 0 deletions
qutebrowser/config

View file

@ -40,3 +40,6 @@ c.aliases["cookie-block"] = "spawn --userscript qute-cookie-block"
# open last downloads in dmenu-like
c.aliases["recent-downloads"] = "spawn --userscript recently-downloaded"
# annotate with hypothesis
c.aliases["hypothesis"] = "jseval (function(){window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s)})();'hypothesis enabled'"

View file

@ -86,6 +86,7 @@ config.bind('"p', "send-to-scihub", mode="normal") # view current page doi on s
config.bind(";p", "hint links run send-to-scihub") # view linked doi on scihub
config.bind(lleader + "r", "readable", mode="normal")
config.bind(lleader + "a", "hypothesis", mode="normal")
# set stylesheets for the browser to use
config.bind(