Skip to content

Commit

Permalink
refactor: remove un-needed function
Browse files Browse the repository at this point in the history
  • Loading branch information
Slowlife01 committed Dec 29, 2024
1 parent 1abf62f commit 8c30822
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions websites/Y/Yandex Music/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ presence.on("UpdateData", async () => {
? navigator.mediaSession.metadata.artwork.at(-1).src
: "https://cdn.rcd.gg/PreMiD/websites/Y/Yandex%20Music/assets/logo.png",
timePassed = document.querySelector(".progress__left").textContent,
durationString = document.querySelector(".progress__right").textContent,
[currentTime, duration] = [
presence.timestampFromFormat(timePassed),
(() => {
return (
presence.timestampFromFormat(durationString) +
presence.timestampFromFormat(timePassed)
);
})(),
presence.timestampFromFormat(
document.querySelector(".progress__right").textContent
) + presence.timestampFromFormat(timePassed),
],
[startTimestamp, endTimestamp] = presence.getTimestamps(
currentTime,
Expand Down

0 comments on commit 8c30822

Please sign in to comment.