Skip to content

Commit

Permalink
https://github.com/haxtheweb/issues/issues/2181
Browse files Browse the repository at this point in the history
  • Loading branch information
btopro committed Nov 12, 2024
1 parent 73a678e commit 76aca44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions elements/media-behaviors/media-behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ globalThis.MediaBehaviors.Video = {
else if (input.indexOf("youtube.com/watch") != -1) {
return input.replace("youtube.com/watch", "youtube.com/embed/") + v;
}
// copy and paste from the URL shorts
else if (input.indexOf("youtube.com/shorts/") != -1) {
return input.replace("youtube.com/shorts/", "youtube.com/embed/") + v;
}
// copy and paste from the URL
else if (input.indexOf("youtube-no-cookie.com/") != -1) {
return input.replace("youtube-no-cookie.com/", "youtube.com/") + v;
Expand Down
4 changes: 4 additions & 0 deletions elements/media-behaviors/src/media-behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ globalThis.MediaBehaviors.Video = {
else if (input.indexOf("youtube.com/watch") != -1) {
return input.replace("youtube.com/watch", "youtube.com/embed/") + v;
}
// copy and paste from the URL shorts
else if (input.indexOf("youtube.com/shorts/") != -1) {
return input.replace("youtube.com/shorts/", "youtube.com/embed/") + v;
}
// copy and paste from the URL
else if (input.indexOf("youtube-no-cookie.com/") != -1) {
return input.replace("youtube-no-cookie.com/", "youtube.com/") + v;
Expand Down

0 comments on commit 76aca44

Please sign in to comment.