From e83f9cc49fa59894da71cb7fce25b587f60c5442 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sat, 22 Jun 2024 01:49:43 -0400 Subject: [PATCH] qute: let priviblur userscript switch instances too --- qutebrowser/userscripts/priviblur | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qutebrowser/userscripts/priviblur b/qutebrowser/userscripts/priviblur index ef370fc..c3ad90c 100755 --- a/qutebrowser/userscripts/priviblur +++ b/qutebrowser/userscripts/priviblur @@ -1,8 +1,11 @@ #!/usr/bin/fish set json (trurl --json $QUTE_URL | jq .[].parts) -set blog (echo $json | jq -r .host | cut -d. -f1) +set blog /(echo $json | jq -r .host | cut -d. -f1) set page (echo $json | jq -r .path) set instances https://github.com/syeopite/priviblur/raw/master/instances.md set instances priviblur.fly.dev (curl -L $instances | grep https | awk -F'[][]' '{print $2}') set instance (random choice $instances) -echo "open $instance/$blog$page" >> $QUTE_FIFO +if string match '* - Priviblur' $QUTE_TITLE + set blog '' +end +echo "open $instance$blog$page" >> $QUTE_FIFO