]> gitweb.michael.orlitzky.com - charm-bypass.git/commitdiff
index.html.in: clean up var/let/const usage
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 1 Nov 2023 19:18:45 +0000 (15:18 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 1 Nov 2023 19:18:45 +0000 (15:18 -0400)
index.html.in

index 421fedaa72aa5eac6daf10046af4082a759e84f9..fb31283fedcb137a0b5bd7c3b3e56595f13b41cf 100644 (file)
         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");
         }
         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");
         }
         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");
         }
         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;