Files
ESPEasy/static/timed_refresh.js
T
TD-er 9eb2ebe210 [Cleanup] Minify JavaScript and CSS to reduce sketch size
Sketch size is reduced by 5 - 6 kB
Files are extracted from original source and moved to `static` directory.
2018-10-31 16:25:42 +01:00

12 lines
347 B
JavaScript

function timedRefresh(timeoutPeriod) {
var timer = setInterval(function() {
if (timeoutPeriod > 0) {
timeoutPeriod -= 1;
document.getElementById('countdown').innerHTML = timeoutPeriod + '..' + '<br />';
} else {
clearInterval(timer);
window.location.href = window.location.href;
};
}, 1000);
};