mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
91bc5b49ca
commit
83ab4960fa
2 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@
|
||||||
if (timeLeft >= 0) {
|
if (timeLeft >= 0) {
|
||||||
countdownEl.innerText = timeLeft;
|
countdownEl.innerText = timeLeft;
|
||||||
} else {
|
} else {
|
||||||
window.location.reload(true);
|
window.location.href = window.location.href + "?timestamp=" + new Date().getTime();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -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">10</span> 秒后重试,请勿关闭浏览器。</b></p>
|
||||||
<script>
|
<script>
|
||||||
let timeLeft = 30;
|
let timeLeft = 10;
|
||||||
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.reload(true);
|
window.location.href = window.location.href + "?timestamp=" + new Date().getTime();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue