From 700c57559bb61f18657ba0d2a761b568dfdb509a Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 17 Sep 2023 10:21:11 +0000 Subject: [PATCH] JS: Replace '.setAttribute("href")' with '.href' Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> --- assets/js/player.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index 8eae54f46..bed028750 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -127,8 +127,8 @@ player.on('timeupdate', function () { let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url'); let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url'); - elem_yt_watch.setAttribute('href') = addCurrentTimeToURL(base_url_yt_watch); - elem_yt_embed.setAttribute('href') = addCurrentTimeToURL(base_url_yt_embed); + elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch); + elem_yt_embed.href = addCurrentTimeToURL(base_url_yt_embed); // Invidious links @@ -138,8 +138,8 @@ player.on('timeupdate', function () { let base_url_iv_embed = elem_iv_embed.getAttribute('data-base-url'); let base_url_iv_other = elem_iv_other.getAttribute('data-base-url'); - elem_iv_embed.setAttribute('href') = addCurrentTimeToURL(base_url_iv_embed); - elem_iv_other.setAttribute('href') = addCurrentTimeToURL(base_url_iv_other); + elem_iv_embed.href = addCurrentTimeToURL(base_url_iv_embed); + elem_iv_other.href = addCurrentTimeToURL(base_url_iv_other); });