Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Granblue Fantasy Update #2449

Merged
merged 5 commits into from
Nov 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update presence.ts
Added boss name detection
  • Loading branch information
Morrays authored Nov 9, 2020
commit bb88f15ada4a9a7393387c038cca95751e541611
5 changes: 4 additions & 1 deletion websites/G/GBF/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ presence.on("UpdateData", async () => {
const data: PresenceData = {
largeImageKey: "logo"
};


var boss;
data.startTimestamp = browsingStamp;

if (document.location.hostname == "game.granbluefantasy.jp") {
Expand All @@ -34,6 +35,8 @@ presence.on("UpdateData", async () => {
document.location.href.includes("/#raid_multi")
) {
data.details = "In a battle";
boss = document.getElementsByClassName("name")[0].innerHTML;
data.details = boss;
} else if (document.location.href.includes("/#party/index/0/npc/0")) {
data.details = "Viewing party";
} else if (document.location.href.includes("/#enhancement")) {
Expand Down