Mind multiple train names for one train
This commit is contained in:
parent
0c17dfc94f
commit
d4d97d899d
@ -40,10 +40,13 @@ var observer = new MutationObserver((mutations, observer) => {
|
|||||||
var timetable = target.querySelector("td div.detailContainer table.result tbody");
|
var timetable = target.querySelector("td div.detailContainer table.result tbody");
|
||||||
var products = timetable.querySelectorAll("tr.first td.products");
|
var products = timetable.querySelectorAll("tr.first td.products");
|
||||||
products.forEach((product) => {
|
products.forEach((product) => {
|
||||||
var train_name = bahnParseTrainName(product.querySelector("span a").innerText);
|
var train_names = product.querySelectorAll("span a");
|
||||||
if(typeof train_name !== 'undefined') {
|
train_names.forEach((train) => {
|
||||||
product.innerHTML = product.innerHTML + ' <a href="https://marudor.de/details/' + train_name + '" target="_blank"><img src="' + getMediaURL("marudor.svg") + '" style="height: 2em; vertical-align:middle;"></a>';
|
var train_name = bahnParseTrainName(train.innerText);
|
||||||
}
|
if(typeof train_name !== 'undefined') {
|
||||||
|
product.innerHTML = product.innerHTML + ' <a href="https://marudor.de/details/' + train_name + '" target="_blank"><img src="' + getMediaURL("marudor.svg") + '" style="height: 2em; vertical-align:middle;"></a>';
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
var stations = timetable.querySelectorAll("tr td.station");
|
var stations = timetable.querySelectorAll("tr td.station");
|
||||||
stations.forEach((station) => {
|
stations.forEach((station) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user