-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path404.html
More file actions
27 lines (27 loc) · 730 Bytes
/
Copy path404.html
File metadata and controls
27 lines (27 loc) · 730 Bytes
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Offline Python Tutor</title>
<script>
// GitHub Pages SPA redirect: preserves the path as a hash route
// e.g. /python-tutor/s/variables -> /python-tutor/#/s/variables
var path = window.location.pathname;
var repo = '/python-tutor';
if (path.startsWith(repo)) {
var route = path.slice(repo.length);
if (route && route !== '/') {
window.location.replace(repo + '/#' + route);
} else {
window.location.replace(repo + '/');
}
} else {
window.location.replace(repo + '/');
}
</script>
</head>
<body>
<p>Redirecting…</p>
</body>
</html>