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 products = timetable.querySelectorAll("tr.first td.products");
|
||||
products.forEach((product) => {
|
||||
var train_name = bahnParseTrainName(product.querySelector("span a").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 train_names = product.querySelectorAll("span a");
|
||||
train_names.forEach((train) => {
|
||||
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");
|
||||
stations.forEach((station) => {
|
||||
|
Loading…
Reference in New Issue
Block a user