mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-18 09:39:30 -07:00
close #13 refresh page at end of loop
This commit is contained in:
@@ -465,7 +465,7 @@ const index = (() => {
|
||||
document.getElementById('spanRefreshCountDown').innerHTML = `${dt.getMinutes() < 10 ? `0${dt.getMinutes()}` : dt.getMinutes()}:${dt.getSeconds() < 10 ? `0${dt.getSeconds()}` : dt.getSeconds()}`;
|
||||
|
||||
// Time has elapsed.
|
||||
if (AutoRefreshCountMs >= AutoRefreshTotalIntervalMs) LoadTwcData();
|
||||
if (AutoRefreshCountMs >= AutoRefreshTotalIntervalMs && !navigation.isPlaying()) LoadTwcData();
|
||||
};
|
||||
AutoRefreshIntervalId = window.setInterval(AutoRefreshTimer, AutoRefreshIntervalMs);
|
||||
AutoRefreshTimer();
|
||||
@@ -537,8 +537,18 @@ const index = (() => {
|
||||
return noSleep.controller.disable();
|
||||
};
|
||||
|
||||
const refreshCheck = () => {
|
||||
// Time has elapsed.
|
||||
if (AutoRefreshCountMs >= AutoRefreshTotalIntervalMs) {
|
||||
LoadTwcData();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return {
|
||||
init,
|
||||
message,
|
||||
refreshCheck,
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user