From 64c3430d292803a3527b22b7960a32f778d83d65 Mon Sep 17 00:00:00 2001 From: Dutsakorn Tubsang <66200082@kmitl.ac.th> Date: Sun, 29 Dec 2024 10:27:23 +0700 Subject: [PATCH] fix: deleted unnecessary commentand change document.URL to location.href --- websites/D/Dek-d/presence.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/websites/D/Dek-d/presence.ts b/websites/D/Dek-d/presence.ts index 65b7dd8c3986..e9ac254ed53b 100644 --- a/websites/D/Dek-d/presence.ts +++ b/websites/D/Dek-d/presence.ts @@ -81,9 +81,7 @@ presence.on("UpdateData", async () => { type: ActivityType.Watching, // initial details in case of no match displaying the 1st path segment details: `Browsing ${pathSegments[1]}`, - // buttons: [{ label: "Visit", url: document.URL }], - }, - // board thread play function + }, // board thread play function displaySec = (categorys = " ") => { presenceData.details = `Viewing${categorys}discussion thread`; }; @@ -279,8 +277,8 @@ presence.on("UpdateData", async () => { if ( pathSegments[2] === "writer" && - document.URL.includes(document.URL.split("/")[5]) && - document.URL.split("/")[5].split(".")[0] === "view" + document.location.href.includes(document.location.href.split("/")[5]) && + document.location.href.split("/")[5].split(".")[0] === "view" ) { const novelCoverElement = document.querySelector("div.novel-cover-img"); if (novelCoverElement) {