This commit is contained in:
Joseph Cheung 2023-02-26 13:10:52 +08:00
parent 91bc5b49ca
commit 83ab4960fa
2 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@
if (timeLeft >= 0) {
countdownEl.innerText = timeLeft;
} else {
window.location.reload(true);
window.location.href = window.location.href + "?timestamp=" + new Date().getTime();
}
}, 1000);
</script>

View file

@ -4,16 +4,16 @@
{{ icon_big('warning') }}
<div>
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
<p><b>此页面将在 <span id="countdown">30</span> 秒后重试,请勿关闭浏览器。</b></p>
<p><b>此页面将在 <span id="countdown">10</span> 秒后重试,请勿关闭浏览器。</b></p>
<script>
let timeLeft = 30;
let timeLeft = 10;
const countdownEl = document.getElementById("countdown");
setInterval(() => {
timeLeft--;
if (timeLeft >= 0) {
countdownEl.innerText = timeLeft;
} else {
window.location.reload(true);
window.location.href = window.location.href + "?timestamp=" + new Date().getTime();
}
}, 1000);
</script>