-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js.html
More file actions
38 lines (37 loc) · 1.12 KB
/
Copy pathindex.js.html
File metadata and controls
38 lines (37 loc) · 1.12 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
<!DOCTYPE html>
<head>
<title>URLchess</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="preload" href="assets/URLchess.css?v0.10" as="style" onload="this.rel='stylesheet'">
</head>
<body>
<noscript>
<p>You need to enable JavaScript to run URLchess.</p>
</noscript>
<script type="text/javascript" defer>
//<![CDATA[
window.addEventListener("load", function() {
// Backwards compatibility with URLchess links when version was 0.6 and lower.
var hash = window.location.hash;
var search = window.location.search;
if (search.startsWith("?")) {
search = search.slice(1);
}
if (
(search.length > 0 && hash.length == 0)
||
(search.length == 0 && hash.length == 0 && window.location.href.indexOf("?") != -1)
){
//window.alert("URL is in format for URLchess version <=0.6, transforming...");
window.location.href = window.location.href.replace("?", "#");
}
// Load and execute URLchess.js
var script = document.createElement('script');
script.src = "assets/URLchess.js?v0.10";
document.body.appendChild(script);
});
//]]>
</script>
</body>
</html>