Tridactyl: makes tridactyl redirect youtube iframes

Previously it was only main frames - now iframes too.
This commit is contained in:
Jonathan Hodgson 2022-07-18 21:25:17 +01:00
parent 45a44e55ec
commit 5156ae80dc

View file

@ -143,7 +143,7 @@ twitterredirect
" Redirect youtube to yewtu.be
command youtuberedirect autocmd BeforeRequest *://*.youtube.com/* (e)=>{\
if ( e.type == "main_frame" && null == e.url.match("[?|&]noredirect=1") ){\
if ( ( e.type == "main_frame" || e.type == "sub_frame" ) && null == e.url.match("[?|&]noredirect=1") ){\
return {redirectUrl: e.url.replace("youtube.com", "yewtu.be")};\
} return {}\
}