2019-06-30 14:22:59 +02:00
|
|
|
<!-- index.html: Referred to as the "main page" in documentation -->
|
|
|
|
|
2020-03-30 00:33:26 +02:00
|
|
|
<meta name="description" content="Create and view web pages stored entirely in the URL">
|
2020-05-27 22:35:30 +02:00
|
|
|
<link rel="shortcut icon" href="favicon.ico">
|
2020-03-30 00:33:26 +02:00
|
|
|
|
2019-06-30 09:57:20 +02:00
|
|
|
<noscript>JavaScript is required to convert the URL into a usable web page.</noscript>
|
2019-06-30 14:22:59 +02:00
|
|
|
|
2020-05-15 03:13:12 +02:00
|
|
|
<script type="text/javascript" src="b64.js"></script>
|
2020-07-19 21:11:40 +02:00
|
|
|
<script type="text/javascript" src="api.js"></script>
|
2019-06-30 09:57:20 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
if (window.location.hash) {
|
2019-06-30 14:22:59 +02:00
|
|
|
// Try to get page data from the URL if possible
|
2019-06-30 09:57:20 +02:00
|
|
|
var hash = window.location.hash.slice(1);
|
2020-05-15 03:13:12 +02:00
|
|
|
var data = b64.decode(hash);
|
2020-07-15 05:01:17 +02:00
|
|
|
|
|
|
|
try {
|
|
|
|
var urlDataObject = JSON.parse(data);
|
|
|
|
var api = apiVersions[urlDataObject.version];
|
|
|
|
document.write(api.decode(urlDataObject));
|
|
|
|
} catch (err) {
|
|
|
|
document.write(decodeURIComponent(data));
|
|
|
|
}
|
2019-06-30 09:57:20 +02:00
|
|
|
} else {
|
2019-06-30 14:22:59 +02:00
|
|
|
// Otherwise redirect to the editor
|
2019-06-30 09:57:20 +02:00
|
|
|
window.location.replace("./editor");
|
|
|
|
}
|
|
|
|
</script>
|