This commit is contained in:
Joseph Cheung 2023-02-26 13:22:28 +08:00
parent 83ab4960fa
commit 12a45f604c
2 changed files with 5 additions and 5 deletions

View file

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

View file

@ -4,9 +4,9 @@
{{ icon_big('warning') }} {{ icon_big('warning') }}
<div> <div>
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p> <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
<p><b>此页面将在 <span id="countdown">10</span> 秒后重试,请勿关闭浏览器。</b></p> <p><b>此页面将在 <span id="countdown">15</span> 秒后重试,请勿关闭浏览器。</b></p>
<script> <script>
let timeLeft = 10; let timeLeft = 15;
const countdownEl = document.getElementById("countdown"); const countdownEl = document.getElementById("countdown");
setInterval(() => { setInterval(() => {
timeLeft--; timeLeft--;