From 5ed354d0b56f043da817c60ec1ff67d8b8774bed Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 9 Mar 2018 17:55:41 -0700 Subject: [PATCH] url handler fix --- .scripts/webview | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.scripts/webview b/.scripts/webview index 3f80998..d34be80 100755 --- a/.scripts/webview +++ b/.scripts/webview @@ -11,8 +11,6 @@ vidsites="youtube.com \|hooktube.com \|bitchute.com " -detectVidSite() { (echo "$1" | grep "$vidsites">/dev/null) && mpv -quiet $1 > /dev/null & } - ext="${1##*.}" mpvFiles="mkv mp4 gif" fehFiles="png jpg jpeg jpe" @@ -24,6 +22,8 @@ elif echo $mpvFiles | grep -w $ext > /dev/null; then mpv --loop --quiet "$1" > /dev/null & elif echo $wgetFiles | grep -w $ext > /dev/null; then wget "$1" >/dev/null & +elif echo "$1" | grep "$vidsites">/dev/null; then + mpv -quiet "$1" > /dev/null & else - detectVidSite "$1" + $BROWSER "$1" 2>/dev/null & disown fi