mirror of
https://github.com/jstrieb/urlpages.git
synced 2024-12-23 06:12:16 +01:00
15 lines
480 B
HTML
15 lines
480 B
HTML
<!-- index.html: Referred to as the "main page" in documentation -->
|
|
|
|
<noscript>JavaScript is required to convert the URL into a usable web page.</noscript>
|
|
|
|
<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 = atob(hash);
|
|
document.write(decodeURIComponent(data));
|
|
} else {
|
|
// Otherwise redirect to the editor
|
|
window.location.replace("./editor");
|
|
}
|
|
</script>
|