Repository navigation
Expand file tree
/
Copy path404.html
More file actions
72 lines (61 loc) · 2.06 KB
/
Copy path404.html
File metadata and controls
72 lines (61 loc) · 2.06 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Redirecting…</title>
<!-- Fallback meta refresh (for browsers without JS): go to help root -->
<meta http-equiv="refresh" content="5;url=https://mirfatif.github.io/PermissionManagerX/help/" />
<style>
body {
display: flex;
min-height: 100vh;
margin: 0;
align-items: center;
justify-content: center;
color: #111827;
}
.card {
background: white;
padding: 1.25rem 1.5rem;
border-radius: 12px;
box-shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
max-width: 720px;
text-align: left;
}
a {
color: #0366d6;
text-decoration: none;
}
</style>
</head>
<body>
<main class="card" role="main">
<h1>Redirecting…</h1>
<p id="message">If your browser doesn't redirect automatically, <a href="https://mirfatif.github.io/PermissionManagerX/help/">click here</a>.</p>
</main>
<script>
(function () {
var origin = location.origin || (location.protocol + '//' + location.host);
var parts = location.pathname.split('/');
var helpIndex = parts.indexOf('help');
var target;
if (helpIndex !== -1 && parts[helpIndex + 1] === 'en') {
// Remove the 'en' segment immediately after 'help'
parts.splice(helpIndex + 1, 1);
var newPath = parts.join('/') || '/';
target = origin + newPath + (location.search || '') + (location.hash || '');
} else if (helpIndex !== -1 && parts[helpIndex + 1] === 'cn') {
// Replace the 'cn' segment immediately after 'help' with 'zh'
parts.splice(helpIndex + 1, 1, 'zh');
var newPath = parts.join('/') || '/';
target = origin + newPath + (location.search || '') + (location.hash || '');
} else {
target = origin + '/PermissionManagerX/help/';
}
document.getElementById('message').textContent = 'Redirecting to: ' + target;
location.replace(target);
})();
</script>
</body>
</html>