From 8f34dbdc50ce51738a0c4432a2f6a5c2b902c796 Mon Sep 17 00:00:00 2001 From: rnek0 <52655832+rnek0@users.noreply.github.com> Date: Thu, 13 Jul 2023 23:29:47 +0200 Subject: [PATCH] Update player.js About issue : https://github.com/iv-org/invidious/issues/3933 I think it should be reviewed here: https://github.com/rnek0/invidious/blob/507bed6313b49564e53b69a5c9b4d072d1e05e4b/assets/js/player.js#L40 short_url will be used here : https://github.com/rnek0/invidious/blob/507bed6313b49564e53b69a5c9b4d072d1e05e4b/assets/js/player.js#L119 since get embedCode() a little further down returns a correct code by calling the same function on line 127 I would suggest changing this: "var short_url = location.origin + '/' + video_data.id + embed_url.search;" to this "var short_url = location.origin + '/watch?v=' + video_data.id + embed_url.search;" --- assets/js/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/player.js b/assets/js/player.js index bb53ac24..d6a3097e 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -37,7 +37,7 @@ if (player_data.aspect_ratio) { var embed_url = new URL(location); embed_url.searchParams.delete('v'); -var short_url = location.origin + '/' + video_data.id + embed_url.search; +var short_url = location.origin + '/watch?v=' + video_data.id + embed_url.search; embed_url = location.origin + '/embed/' + video_data.id + embed_url.search; var save_player_pos_key = 'save_player_pos';