|
|
|
@ -222,13 +222,25 @@ function onItineraries(data) {
|
|
|
|
|
var departureHeading = document.createElement('h3') |
|
|
|
|
trainDiv.appendChild(departureHeading) |
|
|
|
|
departureHeading.classList.add('departure', 'station') |
|
|
|
|
departureHeading.textContent = train.from |
|
|
|
|
var departureLink = document.createElement('a') |
|
|
|
|
departureHeading.appendChild(departureLink) |
|
|
|
|
departureLink.textContent = train.from |
|
|
|
|
departureLink.classList.add('no-custom-a') |
|
|
|
|
var departureUrl = new URL('/view-station.html', window.location.origin) |
|
|
|
|
departureUrl.searchParams.set('station', train.from) |
|
|
|
|
departureLink.href = departureUrl.toString() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var trainP = document.createElement('p') |
|
|
|
|
trainDiv.appendChild(trainP) |
|
|
|
|
trainP.classList.add('pri', 'train') |
|
|
|
|
trainIdSpan(train.trainRank, train.trainNumber, trainP) |
|
|
|
|
var trainLink = document.createElement('a') |
|
|
|
|
trainP.appendChild(trainLink) |
|
|
|
|
trainIdSpan(train.trainRank, train.trainNumber, trainLink) |
|
|
|
|
trainLink.classList.add('no-custom-a') |
|
|
|
|
var trainUrl = new URL('/view-train.html', window.location.origin) |
|
|
|
|
trainUrl.searchParams.set('train', train.trainNumber) |
|
|
|
|
trainLink.href = trainUrl.toString() |
|
|
|
|
|
|
|
|
|
var arrivalTimeP = document.createElement('p') |
|
|
|
|
trainDiv.appendChild(arrivalTimeP) |
|
|
|
@ -241,7 +253,13 @@ function onItineraries(data) {
|
|
|
|
|
var arrivalHeading = document.createElement('h3') |
|
|
|
|
trainDiv.appendChild(arrivalHeading) |
|
|
|
|
arrivalHeading.classList.add('arrival', 'station') |
|
|
|
|
arrivalHeading.textContent = train.to |
|
|
|
|
var arrivalLink = document.createElement('a') |
|
|
|
|
arrivalHeading.appendChild(arrivalLink) |
|
|
|
|
arrivalLink.textContent = train.to |
|
|
|
|
arrivalLink.classList.add('no-custom-a') |
|
|
|
|
var arrivalUrl = new URL('/view-station.html', window.location.origin) |
|
|
|
|
arrivalUrl.searchParams.set('station', train.from) |
|
|
|
|
arrivalLink.href = arrivalUrl.toString() |
|
|
|
|
|
|
|
|
|
if (!last) { |
|
|
|
|
var nextDepartureTimeP = document.createElement('p') |
|
|
|
|