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
* 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)");
/* 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;
}
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");
}