summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormeow <woem>2022-05-31 11:58:12 +0300
committermeow <woem>2022-05-31 11:58:12 +0300
commitb12149bafd7ed20daa757163e84381f6650e9d2e (patch)
treef10aef20f98283c2f80b2d0c1341d4735fea7f95
parentb7295977284f060b4c294332d9029ed46aa8f35d (diff)
downloadinvidious-b12149bafd7ed20daa757163e84381f6650e9d2e.tar.gz
invidious-b12149bafd7ed20daa757163e84381f6650e9d2e.tar.bz2
invidious-b12149bafd7ed20daa757163e84381f6650e9d2e.zip
Save time during redirection on another instance
-rw-r--r--assets/js/player.js6
1 files changed, 6 insertions, 0 deletions
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);
+});