Providing a link to the page from the index.html of the static website

This commit is contained in:
David Négrier 2020-05-24 15:03:41 +02:00
parent 0e0649b3ec
commit c432c78f08

View file

@ -1,5 +1,20 @@
<html> <html>
<head>
<script>
window.onload = function() {
var path = window.location.pathname;
if (path.endsWith('index.html')) {
path = path.substr(path, path.length - 'index.html'.length);
}
var url = 'https://workadventu.re/_/global/'+window.location.host+path+'map.json';
document.getElementById('mapLink').href = url;
document.getElementById('mapLink').innerText = url;
};
</script>
</head>
<body> <body>
This website contains a map for <a href="https://workadventu.re">Workadventu.re</a> This website contains a map for <a href="https://workadventu.re">Workadventu.re</a>.
<br/>
You can access this map at <a id="mapLink" href=""></a>
</body> </body>
</html> </html>