Ignore query params in linkhandler case statement.

Not sure if changing it to a bash script breaks your stuff, as I just copy-pasted what I like into my own config.
This commit is contained in:
harryvederci 2022-03-22 18:14:12 +00:00 committed by GitHub
parent 975353bf71
commit f43f62d8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
# Feed script a url or file location. # Feed script a url or file location.
# If an image, it will view in sxiv, # If an image, it will view in sxiv,
@ -9,7 +9,11 @@
# If no url given. Opens browser. For using script as $BROWSER. # If no url given. Opens browser. For using script as $BROWSER.
[ -z "$1" ] && { "$BROWSER"; exit; } [ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in
link_without_query_params="$(echo "$1" | cut -d? -f1)"
case "$link_without_query_params" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*) *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;;
*png|*jpg|*jpe|*jpeg|*gif) *png|*jpg|*jpe|*jpeg|*gif)