Skip to content

Commit

Permalink
updated ytlivestamper.js for /live/ and /shorts/ links
Browse files Browse the repository at this point in the history
  • Loading branch information
Krazete committed Jun 3, 2024
1 parent ad2d276 commit dc743dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ytlivestamper.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ function closePane() {
}

function updateStamp(stamp, time) {
var vid = location.search.split(/.+v=|&/)[1] || location.href.split(/\/live\/|\/shorts\/|\?|&/)[1];
stamp.innerHTML = formatTime(time);
stamp.dataset.time = time;
stamp.href = "https://youtu.be/" + location.search.split(/.+v=|&/)[1] + "?t=" + time;
stamp.href = "https://youtu.be/" + vid + "?t=" + time;
}

function clickStamp(e) {
Expand Down

0 comments on commit dc743dd

Please sign in to comment.