mirror of
https://github.com/Daniongithub/ER-TPL.git
synced 2025-10-02 12:10:48 +00:00
Update fermata.js
This commit is contained in:
@@ -15,6 +15,10 @@ function caricadati(){
|
|||||||
const container = document.getElementById('tabella-container');
|
const container = document.getElementById('tabella-container');
|
||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
|
|
||||||
|
fetch('https://api.vichingo455.freeddns.org/fermateapi/versione')
|
||||||
|
.then(res => res.text())
|
||||||
|
.then(versione => document.getElementById("ver").innerHTML = versione);
|
||||||
|
|
||||||
if (!data || data.length === 0) {
|
if (!data || data.length === 0) {
|
||||||
container.innerHTML = '<h3>Nessuna linea in arrivo.</h3>';
|
container.innerHTML = '<h3>Nessuna linea in arrivo.</h3>';
|
||||||
return;
|
return;
|
||||||
@@ -57,10 +61,6 @@ function caricadati(){
|
|||||||
table.appendChild(tbody);
|
table.appendChild(tbody);
|
||||||
|
|
||||||
container.appendChild(table);
|
container.appendChild(table);
|
||||||
|
|
||||||
fetch('https://api.vichingo455.freeddns.org/fermateapi/versione')
|
|
||||||
.then(res => res.text())
|
|
||||||
.then(versione => document.getElementById("ver").innerHTML = versione);
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error('Errore nel caricamento dati:', err);
|
console.error('Errore nel caricamento dati:', err);
|
||||||
@@ -70,4 +70,5 @@ function caricadati(){
|
|||||||
|
|
||||||
caricadati();
|
caricadati();
|
||||||
|
|
||||||
setInterval(caricadati, 60000);
|
|
||||||
|
setInterval(caricadati, 60000);
|
||||||
|
Reference in New Issue
Block a user