-
Notifications
You must be signed in to change notification settings - Fork 1
/
configuration.html
43 lines (40 loc) · 1.06 KB
/
configuration.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<p align="center" style="font-size: 30px;">
Redirect after <b><span id="countdown">3</span></b>s
</p>
<p align="center">
<small>Powered by <a target="_blank" href="https://github.com/vuepressjs/vuepress-plugin-html-redirect">vuepress-plugin-redirect</a></small>
</p>
<script>
var el = document.getElementById("countdown");
var isIE = navigator.appName.indexOf("Explorer") > -1;
var routerBase = window.routerBase || "/";
var isInternalDirect = true;
var redirectUrl = "/docs/configuration.html";
var countdown = el
? (isIE ? el.innerText : el.textContent)
: 0;
function redirect() {
if (countdown <= 0) {
if (isInternalDirect) {
redirectUrl = routerBase + redirectUrl.replace(/^\//, '')
}
location.href = redirectUrl
} else {
if (isIE) {
el.innerText = countdown--;
} else {
el.textContent = countdown--;
}
}
}
redirect();
setInterval(redirect, 1000);
</script>
</body>
</html>