handle youtu.be for Freetube redirect

Freetube doens't handle case when videoID is just path
This commit is contained in:
Michal Mitter 2022-07-20 10:16:29 +02:00
parent cd35a73b4d
commit 846476d6b6
1 changed files with 2 additions and 0 deletions

View File

@ -274,6 +274,8 @@ function redirectYouTube(url, initiator, type) {
return null;
}
if (useFreeTube && type === "main_frame") {
if (url.host === "youtu.be")
return `freetube://https://youtube.com/watch?v=${url.pathname.slice(1)}`
return `freetube://${url}`;
}
// Apply settings