Skip to content

Commit

Permalink
fix(Sparknotes): fix bad display (PreMiD#6669)
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingSunLight42 authored Aug 17, 2022
1 parent eab09f4 commit e836fa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion websites/S/Sparknotes/dist/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"nl": "Uw bron voor hulp met Shakespeare en Engelse literatuur, plus geschiedenis, wiskunde, biologie, en meer."
},
"url": "www.sparknotes.com",
"version": "1.0.12",
"version": "1.0.13",
"logo": "https://i.imgur.com/jZEhnvk.png",
"thumbnail": "https://i.imgur.com/Ex3iuwk.png",
"color": "#363EE6",
Expand Down
9 changes: 5 additions & 4 deletions websites/S/Sparknotes/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,11 @@ presence.on("UpdateData", async () => {
);
presenceData.startTimestamp = browsingTimestamp;
presenceData.details = `Viewing: ${title.textContent}`;
titlePage = document.querySelector(
"body > header.interior-header > div > div.interior-header__title > div"
);
if (titlePage) presenceData.state = titlePage.textContent;
presenceData.state = `${document
.querySelector(".interior-header__title__umbrella-label")
.textContent.trim()} ${document
.querySelector(".interior-header__title__text__pagetitle")
.textContent.trim()}`;
} else if (path === "/login/") {
presenceData.startTimestamp = browsingTimestamp;
presenceData.details = "Login Unavailable";
Expand Down

0 comments on commit e836fa5

Please sign in to comment.