From abb2e5df5cb18754bffe2db323c76c7428e4a530 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 12 Apr 2025 22:12:11 -0400 Subject: [PATCH 1/4] Update index.html --- index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.html b/index.html index 435c8ed5..0a5a3b60 100644 --- a/index.html +++ b/index.html @@ -15799,6 +15799,7 @@ behaviorRules = { promptState = null; mouseIsDown = false; isMobile = false; + standaloneType = null; genericMenuHandler = null; nextElemID = 1; // detect if mobile @@ -15815,6 +15816,11 @@ behaviorRules = { if (settings.invertscroll === undefined && navigator.platform.toUpperCase().indexOf('MAC')>=0) { settings.invertscroll = true; } + // detect if discord activity + if (navigator.userAgent.match(/Discord/i)) { + standalone = true; + standaloneType = "discord"; + } mouseType = null; function mouseClick(e) { if (showingMenu && currentElement !== "lookup") { @@ -19085,6 +19091,10 @@ Cancer, Landmine, Grenade, Smoke Grenade">? if (isMobile) { document.getElementById("gameDiv").classList.add("mobile"); } + if (standaloneType === "discord") { + document.getElementById("savesButton").style.display = "none"; + document.getElementById("modsButton").style.display = "none"; + } } From ab40601a840bbd597c50505094460b53bcb0770c Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 12 Apr 2025 22:15:57 -0400 Subject: [PATCH 2/4] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0a5a3b60..ee829e4d 100644 --- a/index.html +++ b/index.html @@ -15817,7 +15817,7 @@ behaviorRules = { settings.invertscroll = true; } // detect if discord activity - if (navigator.userAgent.match(/Discord/i)) { + if (location.hostname.match(/discordsays/i)) { standalone = true; standaloneType = "discord"; } From e00b614e6405904559ce6b310eb339af975cde4c Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 12 Apr 2025 22:17:28 -0400 Subject: [PATCH 3/4] Update index.html --- index.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index ee829e4d..c8e5e048 100644 --- a/index.html +++ b/index.html @@ -52,6 +52,7 @@ currentversion = "1.11.1"; saveVersion = 4; standalone = false; + standaloneType = null;