From 54ca5b331e84be105e726895a8ccc01ce7f03ec2 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 3 Nov 2023 12:43:44 -0400 Subject: [PATCH] index.html.in: use strict equality checks everywhere --- index.html.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html.in b/index.html.in index e14b87d..5ab6776 100644 --- a/index.html.in +++ b/index.html.in @@ -506,7 +506,7 @@ const t = document.getElementById("ticket"); const sn = document.getElementById("servicename"); - if (params.get("servicename") == "Commuter Bus") { + if (params.get("servicename") === "Commuter Bus") { /* The top of the background is initially at y=246.859, and * we scale it by a factor of 1.12 to y=276.482 for a change * of 29.623. So after we scale it, we translate it upwards @@ -523,7 +523,7 @@ * tickets overlayed in inkscape */ sn.setAttribute("transform", "translate(0 64.28)"); } - else if (params.get("servicename") == "MARC Train") { + else if (params.get("servicename") === "MARC Train") { /* insane tricks are explained above */ tbg.setAttribute("transform", "translate(0 -72.378) scale(1 1.2932)"); @@ -625,7 +625,7 @@ /* BaltimoreLink and MARC Train */ let minutes = 90; const params = new URLSearchParams(document.location.search); - if (params.get("servicename") == "Commuter Bus") { + if (params.get("servicename") === "Commuter Bus") { /* Commuter bus tickets are only valid for ten minutes */ minutes = 10; } @@ -662,7 +662,7 @@ function swap_day_night() { const sky = document.getElementById("sky"); - if (sky.getAttribute("class") == "night") { + if (sky.getAttribute("class") === "night") { sky.setAttribute("fill", "#efb02f"); sky.setAttribute("class", "day"); } -- 2.44.2