added redirect handling
This commit is contained in:
parent
fecb5e103e
commit
1f912360e7
@ -51,7 +51,9 @@ done
|
|||||||
if [ "$MIME" = "" ] || [ "$MIME" = "$1" ] || [ "$MIME" = "$INPUT" ]
|
if [ "$MIME" = "" ] || [ "$MIME" = "$1" ] || [ "$MIME" = "$INPUT" ]
|
||||||
then
|
then
|
||||||
echo "Determining MIME type of $INPUT:"
|
echo "Determining MIME type of $INPUT:"
|
||||||
MIME=$(curl -I -s "$INPUT" | sed -ne 's/^[cC]ontent-[tT]ype: //p' | sed -e 's/;.\+//g' | tr -d '\r')
|
# Determines HTTP code, might use for something else?
|
||||||
|
# CODE=$(curl -fLIs "$INPUT" | sed -ne 's/ [[:space:]]*$//p' | sed -ne 's|^HTTP/.\+ ||p')
|
||||||
|
MIME=$(curl -fLIs "$INPUT" | sed -ne 's/^[cC]ontent-[tT]ype: //p' | sed -e 's/;.\+//p' | tail -n1 | tr -d '\r')
|
||||||
echo $MIME
|
echo $MIME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
3
xdg-sanity/extensions/youtube-replace
Executable file
3
xdg-sanity/extensions/youtube-replace
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
# EXT-TYPE=replace
|
||||||
|
|
||||||
|
replace youtube.com or youtu.be with piped.mint.lgbt
|
Loading…
Reference in New Issue
Block a user