1
0
Fork 0

Log current stage to console

This commit is contained in:
clerie 2020-09-19 21:38:23 +02:00
parent 650bed8348
commit d9fa338813
1 changed files with 10 additions and 0 deletions

View File

@ -88,10 +88,14 @@ function domCreateButtonMarudor(path) {
} }
var connection_result_observer = new MutationObserver((mutations) => { var connection_result_observer = new MutationObserver((mutations) => {
log("change detected")
mutations.forEach((mutation) => { mutations.forEach((mutation) => {
if (mutation.type === 'childList') { if (mutation.type === 'childList') {
var target = mutation.target; var target = mutation.target;
if (target.tagName === 'TD') { if (target.tagName === 'TD') {
log("change is interesting");
var timetable = target.querySelector("td div.detailContainer table.result tbody"); var timetable = target.querySelector("td div.detailContainer table.result tbody");
/* /*
@ -177,6 +181,8 @@ var connection_result_observer = new MutationObserver((mutations) => {
}); });
log("data collected");
console.log(data); console.log(data);
/* /*
@ -213,6 +219,8 @@ var connection_result_observer = new MutationObserver((mutations) => {
station.append(marudor_button); station.append(marudor_button);
}); });
log("ui injected");
} }
} }
}); });
@ -226,4 +234,6 @@ if(typeof target !== 'undefined') {
subtree: true, subtree: true,
childList: true childList: true
}); });
log("observation started")
} }