Skip to content

Commit

Permalink
Loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderke authored Jun 21, 2022
1 parent d997bb4 commit b9134d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<!-- Inspired by https://stackoverflow.com/a/53218452 -->
<html>
<body>
Loading...
<script>
(async () => {
const response = await fetch('https://api.github.com/repos/Logius-standaarden/Publicatie-Preview/contents/');
const data = await response.json();
let htmlString = '<ul>';
for (let file of data) {
if (file.type == 'dir') {
htmlString += `<li>${file.path}</a></li>`;
htmlString += '<ul>';
htmlString += `<li>${file.path}</a></li>`;
htmlString += '<ul>';
document.getElementsByTagName('body')[0].innerHTML = `Loading <i>${file.name}</i>`;
const response = await fetch(file.url);
const data = await response.json();
for (let file of data) {
Expand Down

0 comments on commit b9134d2

Please sign in to comment.