1
0

Ignore rows not containing any collectable data

This commit is contained in:
clerie 2020-09-20 19:55:03 +02:00
parent 7b3e750513
commit 678d00a57b

View File

@ -151,6 +151,10 @@ var connection_result_observer = new MutationObserver((mutations) => {
var relations = timetable.querySelectorAll("tr.first");
relations.forEach((relation, i) => {
var relationend = relation.nextElementSibling;
while(relationend.querySelector("td.station") == null) {
relationend = relationend.nextElementSibling;
}
data[i] = {};
data[i]["from"] = {}
data[i]["to"] = {}
@ -240,6 +244,9 @@ var connection_result_observer = new MutationObserver((mutations) => {
var relations = timetable.querySelectorAll("tr.first");
relations.forEach((relation, i) => {
var relationend = relation.nextElementSibling;
while(relationend.querySelector("td.station") == null) {
relationend = relationend.nextElementSibling;
}
var products = relation.querySelectorAll("td.products span a");
products.forEach((product, j) => {