From: Michael Orlitzky Date: Wed, 1 Nov 2023 19:18:45 +0000 (-0400) Subject: index.html.in: clean up var/let/const usage X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c424d1320ed070197c26304d81d64b2441d682f4;p=charm-bypass.git index.html.in: clean up var/let/const usage --- diff --git a/index.html.in b/index.html.in index 421feda..fb31283 100644 --- a/index.html.in +++ b/index.html.in @@ -315,7 +315,7 @@ const sid = document.getElementById("serviceid"); /* Get the "serviceid" from the querystring if it's there */ - let params = new URLSearchParams(document.location.search); + const params = new URLSearchParams(document.location.search); if (params.get("serviceid")) { sid.textContent = params.get("serviceid"); } @@ -330,7 +330,7 @@ const sid = document.getElementById("servicename"); /* Get the "servicename" from the querystring if it's there */ - let params = new URLSearchParams(document.location.search); + const params = new URLSearchParams(document.location.search); if (params.get("servicename")) { sid.textContent = params.get("servicename"); } @@ -346,7 +346,7 @@ const ct = document.getElementById("codetext"); /* Get the "code" from the querystring if it's there */ - let params = new URLSearchParams(document.location.search); + const params = new URLSearchParams(document.location.search); if (params.get("code")) { ct.textContent = params.get("code"); } @@ -419,8 +419,8 @@ const date = new Date(); /* BaltimoreLink and MARC Train are valid for an hour and a half */ - var minutes = 90; - let params = new URLSearchParams(document.location.search); + let minutes = 90; + const params = new URLSearchParams(document.location.search); if (params.get("servicename") == "Commuter Bus") { /* But commuter bus tickets are only valid for ten minutes */ minutes = 10;