X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=index.html.in;h=d1e0be72b18e314d7936425570909baa0581635c;hb=db8da45ab6e7467a58501d434e1ca2ebc92c0dbf;hp=74fa30a117d961f54f277a1e662fa67963c27d4e;hpb=ed51376cd0c89ab4613ceaa10f66d6d6fcb00a74;p=charm-bypass.git diff --git a/index.html.in b/index.html.in index 74fa30a..d1e0be7 100644 --- a/index.html.in +++ b/index.html.in @@ -257,6 +257,36 @@ } + /******************************/ + /* Set the service identifier */ + /******************************/ + function set_service_id() { + const sid = document.getElementById("serviceid"); + + /* Get the "serviceid" from the querystring if it's there */ + let params = new URLSearchParams(document.location.search); + if (params.get("serviceid")) { + sid.textContent = params.get("serviceid"); + } + + /* 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 */ /****************************************/ @@ -393,6 +423,12 @@ /* Re-center the ticket when the window is resized */ window.addEventListener("resize", center_ticket); + /* 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);