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