From: Michael Orlitzky Date: Wed, 1 Nov 2023 18:10:32 +0000 (-0400) Subject: index.html.in: support changing the service name via querystring X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=db8da45ab6e7467a58501d434e1ca2ebc92c0dbf;p=charm-bypass.git index.html.in: support changing the service name via querystring --- diff --git a/index.html.in b/index.html.in index 345c432..d1e0be7 100644 --- a/index.html.in +++ b/index.html.in @@ -272,6 +272,21 @@ /* Otherwise, leave it at "F" */ } + /******************************/ + /* Set the service name */ + /******************************/ + function set_service_id() { + const sid = document.getElementById("servicename"); + + /* Get the "servicename" from the querystring if it's there */ + let params = new URLSearchParams(document.location.search); + if (params.get("servicename")) { + sid.textContent = params.get("servicename"); + } + + /* Otherwise, leave it at "BaltimoreLink" */ + } + /****************************************/ /* Set and reposition the security code */ /****************************************/ @@ -411,6 +426,9 @@ /* Set the service identifier when the page has loaded */ window.addEventListener("load", set_service_id); + /* Set the service name when the page has loaded */ + window.addEventListener("load", set_service_name); + /* Set the security code text when the page has loaded */ window.addEventListener("load", set_code);