Add fh userscript
This commit is contained in:
parent
b12a3603db
commit
4ba21cd72b
2 changed files with 18 additions and 1 deletions
15
qutebrowser/userscripts/fh-add
Executable file
15
qutebrowser/userscripts/fh-add
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
from urllib.parse import urlencode
|
||||
|
||||
url = os.environ["QUTE_URL"]
|
||||
fifo = os.environ["QUTE_FIFO"]
|
||||
title = os.environ["QUTE_TITLE"]
|
||||
|
||||
query = {"title": title, "url": url}
|
||||
|
||||
share_link = "https://metagram.net/firehose/share?{}".format(urlencode(query))
|
||||
|
||||
with open(fifo, "w") as f:
|
||||
f.write(":open {}".format(share_link))
|
||||
Loading…
Add table
Add a link
Reference in a new issue