From 1c791fbd4dd79fba3af68e33d4f3306c2c9d476e Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Tue, 14 Jul 2026 22:04:30 -0600 Subject: [PATCH] strip "station" suffix --- static/js/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index e7ad01f..721c34d 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -15,7 +15,6 @@ setInterval(displayLastUpdated, 1000) const RouteType = { TRAM: 1, - SUBWAY: 2, RAIL: 3, BUS: 4, } @@ -175,7 +174,11 @@ function vehiclePopupContent(vehicle) { } if (vehicle.nearest_station) { - content += `
@ ${vehicle.nearest_station.name}` + let station = vehicle.nearest_station.name + if (station.toLowerCase().endsWith("station")) { + station = station.replace(/ station$/i, "") + } + content += `
@ ${station}` } content += `

vehicle #: ${vehicle.id} · trip ID: ${vehicle.trip_id}`