-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
29 lines (27 loc) · 947 Bytes
/
index.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
<!-- public/index.html.template -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GitHub Copilot Updates</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script>
if (window.location.hash.length > 1) {
var basePath = window.location.pathname;
// remove the last / from the basePath if it exists
if (basePath.endsWith('/')) {
basePath = basePath.slice(0, -1);
}
const path = window.location.hash.replace('#', '')
// pushing the state to the history so that the back button works
// will also make sure that the correct URL is shown in the address bar
// and the correct content is rendered
history.pushState({ page: 1 }, "", basePath + path)
}
</script>
</body>
</html>