fix time adding dirung redirection

このコミットが含まれているのは:
meow 2022-05-31 12:18:42 +03:00
コミット f2f3f045e5
1個のファイルの変更6行の追加4行の削除

ファイルの表示

@ -705,8 +705,10 @@ if (location.pathname.startsWith('/embed/')) {
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);
addEventListener('DOMContentLoaded', function () {
// 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);
});
});