Tridactyl: makes tridactyl redirect youtube iframes

Previously it was only main frames - now iframes too.
master
Jonathan Hodgson 2 years ago
parent 45a44e55ec
commit 5156ae80dc
  1. 2
      tridactyl/.config/tridactyl/tridactylrc

@ -143,7 +143,7 @@ twitterredirect
" Redirect youtube to yewtu.be " Redirect youtube to yewtu.be
command youtuberedirect autocmd BeforeRequest *://*.youtube.com/* (e)=>{\ 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 {redirectUrl: e.url.replace("youtube.com", "yewtu.be")};\
} return {}\ } return {}\
} }

Loading…
Cancel
Save