mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 22:14:33 +00:00
NC Status: Ergebnistext im Polling tatsächlich aktualisieren
This commit is contained in:
@@ -93,9 +93,20 @@
|
|||||||
return null;
|
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 lastRunNode=valueNodeForLabel('Letzter Lauf');
|
||||||
var nextRunNode=valueNodeForLabel('Nächster Lauf');
|
var nextRunNode=valueNodeForLabel('Nächster Lauf');
|
||||||
var lastResultNode=valueNodeForLabel('Letztes Ergebnis');
|
var lastResultNode=lastResultValueNode();
|
||||||
|
|
||||||
function poll(){
|
function poll(){
|
||||||
fetch(endpoint+'?_='+Date.now(),{credentials:'same-origin',cache:'no-store'})
|
fetch(endpoint+'?_='+Date.now(),{credentials:'same-origin',cache:'no-store'})
|
||||||
|
|||||||
Reference in New Issue
Block a user