1
0
mirror of https://github.com/5im-0n/sshenc.sh.git synced 2025-08-02 19:30:05 +02:00

don't use fetch, so google maybe can render the page

This commit is contained in:
s2
2019-01-21 11:45:34 +01:00
parent a9c8947cef
commit 7c3b7675fa

View File

@@ -64,13 +64,16 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/8.4.2/markdown-it.min.js"></script>
<script>
var md = window.markdownit();
fetch('README.md')
.then((r) => {
return r.text();
})
.then((r) => {
document.getElementById('md').innerHTML = md.render(r);
});
var xmlhttp;
xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
document.getElementById('md').innerHTML = md.render(xmlhttp.responseText);
}
}
xmlhttp.open("GET", 'README.md', true);
xmlhttp.send();
</script>
</body>