NC Status: Ergebnistext im Polling tatsächlich aktualisieren

This commit is contained in:
Terranom674
2026-08-18 17:28:37 +02:00
parent 875832b73e
commit 77981a4e05

View File

@@ -93,9 +93,20 @@
return null;
}
function lastResultValueNode(){
var notes=[].slice.call(section.querySelectorAll('.bratonien-base-note'));
for(var i=0;i<notes.length;i++){
var text=(notes[i].textContent||'').trim();
if(text.indexOf('Letztes Ergebnis:')===0){
return notes[i].querySelector('strong');
}
}
return null;
}
var lastRunNode=valueNodeForLabel('Letzter Lauf');
var nextRunNode=valueNodeForLabel('Nächster Lauf');
var lastResultNode=valueNodeForLabel('Letztes Ergebnis');
var lastResultNode=lastResultValueNode();
function poll(){
fetch(endpoint+'?_='+Date.now(),{credentials:'same-origin',cache:'no-store'})