Skip to content

Commit

Permalink
A lil fix
Browse files Browse the repository at this point in the history
  • Loading branch information
armup31 committed Nov 20, 2024
1 parent c90ef9e commit 7444c48
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions websites/P/Physics Wallah/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ presence.on("UpdateData", async () => {
presenceData.smallImageText = "Viewing DPP";
}
} else if (pathname.startsWith("/watch")) {
const deta = JSON.parse(localStorage.getItem("SCHEDULE_DETAILS")).tags[0];
const deta = JSON.parse(localStorage.getItem("SCHEDULE_DETAILS")).subject
.name;
let detal = ` | ${deta}`;
if (deta === null) detal = "";
if (!privacyMode) {
Expand All @@ -117,8 +118,10 @@ presence.on("UpdateData", async () => {
}`;

presenceData.buttons = [{ label: "Watch Lecture", url: fullurl }];
} else presenceData.details = `Watching a lecture${detal}`;

} else {
presenceData.details = "Watching a lecture";
presenceData.state = `Subject: ${deta}`;
}
if (document.querySelectorAll(".vjs-paused").length < 1) {
presenceData.smallImageKey = Assets.Play;
presenceData.smallImageText = "Watching a lecture";
Expand Down

0 comments on commit 7444c48

Please sign in to comment.