Repository navigation
Expand file tree
/
Copy path404.html
More file actions
51 lines (49 loc) · 1.85 KB
/
Copy path404.html
File metadata and controls
51 lines (49 loc) · 1.85 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
<!doctype html>
<!--
Copy to the root of the BPMData.github.io repository as 404.html.
GitHub Pages serves this page for any path that has no file, so
https://bpmdata.github.io/<room-code> forwards to the OverHeard student room at
https://over-heard-606573080592.us-east1.run.app/<room-code>. Rooms need no pages of their own.
Real pages always win over this page. App shortcuts below also handle capitalization variants
that have no matching file. Keep app names in sync with RESERVED_ROOM_CODES in OverHeard's
src/rooms/protocol.ts so rooms cannot claim those shortcuts.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BPMData</title>
<link rel="stylesheet" href="/style.css">
<script>
(function () {
var OVERHEARD = 'https://over-heard-606573080592.us-east1.run.app/';
// GitHub Pages project paths are case-sensitive.
var APP_PATHS = new Map([
['allaboard', '/allaboard/'],
['chefbot', '/ChefBot/'],
['overboard', '/overboard/'],
['overheard', '/overheard/']
]);
// Same rule as OverHeard's validRoomCode: 3–40 letters, numbers or hyphens
var match = /^\/([A-Za-z0-9][A-Za-z0-9-]{2,39})\/?$/.exec(window.location.pathname);
if (match) {
var slug = match[1].toLowerCase();
var destination = APP_PATHS.get(slug) || OVERHEARD + slug;
if (destination !== window.location.pathname) {
window.location.replace(destination + window.location.search + window.location.hash);
}
}
})();
</script>
</head>
<body>
<main>
<div class="doc">
<h1>Page not found</h1>
<p>Joining a class? Check the room code your teacher posted, or open
<a href="https://over-heard-606573080592.us-east1.run.app/">OverHeard</a> and enter it there.</p>
<p><a href="/">← All apps</a></p>
</div>
</main>
</body>
</html>