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;