Skip to content

Invidious is an alternative front-end to YouTube

Save time during redirection on another instance

meowb12149bafd7e
diff --git a/assets/js/player.js b/assets/js/player.js
index ff9302b7..4244f2e2 100644
--- a/assets/js/player.js
+++ b/assets/js/player.js
@@ -704,3 +704,9 @@ if (location.pathname.startsWith('/embed/')) {
var cb = player.getChild('ControlBar');
cb.addChild(watch_on_invidious_button);
}
+
+// Save time during redirection on another instance
+const changeInstanceLink = document.querySelector('#watch-on-another-invidious-instance > a');
+if (changeInstanceLink) changeInstanceLink.addEventListener('click', function () {
+ changeInstanceLink.href = addCurrentTimeToURL(changeInstanceLink.href);
+});