-
Notifications
You must be signed in to change notification settings - Fork 127
/
index.html
27 lines (23 loc) · 902 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
<!-- index.html: Referred to as the "main page" in documentation -->
<meta name="description" content="Create and view web pages stored entirely in the URL">
<link rel="shortcut icon" href="favicon.ico">
<noscript>JavaScript is required to convert the URL into a usable web page.</noscript>
<script type="text/javascript" src="b64.js"></script>
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript">
if (window.location.hash) {
// Try to get page data from the URL if possible
var hash = window.location.hash.slice(1);
var data = b64.decode(hash);
try {
var urlDataObject = JSON.parse(data);
var api = apiVersions[urlDataObject.version];
document.write(api.decode(urlDataObject));
} catch (err) {
document.write(decodeURIComponent(data));
}
} else {
// Otherwise redirect to the editor
window.location.replace("./editor");
}
</script>