url("data:font/woff2;base64,@CBPREGULAR@") format("woff2")
}
- #servicename, #tickettime, #ticketdate, #codetext, #zone {
+ #origindest, #servicename, #tickettime, #ticketdate, #codetext, #zone {
font-family: "CharmBypass Regular", sans-serif;
}
}
}
+
+ /*****************************************************/
+ /* Set the origin and destination for the MARC Train */
+ /*****************************************************/
+
+ function set_marc_origin_destination() {
+ const params = new URLSearchParams(document.location.search);
+ if (!params.get("origin") || !params.get("destination")) {
+ return;
+ }
+
+ const src = params.get("origin");
+ const dest = params.get("destination");
+
+ /* origindest contains both the origin and destination */
+ const origindest = document.getElementById("origindest");
+
+ const origin = document.getElementById("origin");
+ const destination = document.getElementById("destination");
+
+ origin.textContent = params.get("origin");
+ destination.textContent = params.get("destination");
+
+ origindest.style.display = "block"; /* It's hidden by default */
+ }
+
/******************************************/
/* Display the ticket (and hide the menu) */
/******************************************/
/* Set the ticket expiration date/time upon page load */
window.addEventListener("load", set_ticket_expiry);
+ /* Set the MARC Train origin and destination, if applicable */
+ window.addEventListener("load", set_marc_origin_destination);
+
/* Set the MARC Train zone, if applicable */
window.addEventListener("load", set_marc_zone);