diff --git a/websites/0-9/4chan/metadata.json b/websites/0-9/4chan/metadata.json index fed3ac0709ba..a0131b3c969a 100644 --- a/websites/0-9/4chan/metadata.json +++ b/websites/0-9/4chan/metadata.json @@ -12,7 +12,7 @@ "www.4chan.org", "4chan.org" ], - "version": "1.0.1", + "version": "1.0.2", "logo": "https://cdn.rcd.gg/PreMiD/websites/0-9/4chan/assets/logo.png", "thumbnail": "https://cdn.rcd.gg/PreMiD/websites/0-9/4chan/assets/thumbnail.png", "color": "#789922", diff --git a/websites/0-9/4chan/presence.ts b/websites/0-9/4chan/presence.ts index 23dba25beb96..8d487c39fb28 100644 --- a/websites/0-9/4chan/presence.ts +++ b/websites/0-9/4chan/presence.ts @@ -93,7 +93,7 @@ presence.on("UpdateData", async () => { largeImageKey: Assets.Logo, startTimestamp: browsingTimestamp, }, - { pathname } = document.location; + { href, pathname } = document.location; if (pathname === "/") presenceData.details = "Viewing the front page"; else if (pathname.startsWith("/faq")) @@ -112,6 +112,13 @@ presence.on("UpdateData", async () => { const threadNum = pathname.split("/").at(-1), threadSubject = document.querySelector(".subject").textContent; + presenceData.buttons = [ + { + label: "View Thread", + url: href, + }, + ]; + if (threadSubject) presenceData.state = `>>${threadNum} - "${threadSubject}"`; else presenceData.state = `>>${threadNum}`;