From 84fc2f6284dd88bdfc95290c88729b1ed99302f4 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Thu, 27 Nov 2025 19:36:47 -0500 Subject: [PATCH] Update index.html --- index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index acefad53..1a10eee9 100644 --- a/index.html +++ b/index.html @@ -20066,10 +20066,11 @@ if (document.referrer && document.referrer.indexOf("r74n.") === -1) { document.cookie = "R74nRef="+refdomain+";max-age=86400;path=/;domain=r74n.com"; } - function loadPlaylight() { - if (!isOnSite) { location.href = "https://r74n.com"; return } + function loadPlaylight(skipDialog=false) { + if (!isOnSite && !skipDialog) { location.href = "https://r74n.com"; return } if (typeof playlightSDK === "undefined") { - document.getElementById("playlightButton").value = "Loading..."; + let button = document.getElementById("playlightButton"); + if (button) button.value = "Loading..."; document.head.insertAdjacentHTML("beforeend",``); let script = document.createElement("script"); script.setAttribute("type","module"); @@ -20084,19 +20085,22 @@ if (document.referrer && document.referrer.indexOf("r74n.") === -1) { enabled: false } }); - playlightSDK.setDiscovery(true); - document.getElementById("playlightButton").value = "More Games"; + ${!skipDialog ? "playlightSDK.setDiscovery(true);" : ""} + ${!skipDialog ? "document.getElementById('playlightButton').value = 'More Games';" : "" } } catch (error) { console.error("Error loading the Playlight SDK:", error); - document.getElementById("playlightButton").value = "Error..."; + ${!skipDialog ? "document.getElementById('playlightButton').value = 'Error...';" : "" } }`; document.head.appendChild(script); } - else { + else if (!skipDialog) { playlightSDK.setDiscovery(true); } } } + if (urlParams.get("utm_source") === "playlight") { + addEventListener("load", function(){ loadPlaylight(true); }); + }