-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
44 lines (42 loc) · 1.07 KB
/
index.html
File metadata and controls
44 lines (42 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<style>
html {
font-family: 'Roboto', sans-serif;
}
body {
background-color: #111;
}
ul li {
color: lightgray;
padding-bottom: 3px;
}
ul li:first-child a {
color: white !important;
font-size: 2em;
}
a {
color: lightblue;
}
</style>
</head>
<body>
<script>
(async () => {
const response = await fetch('https://api.github.com/repos/Rafplayz/userscripts/contents/');
const data = await response.json();
let htmlString = '<ul>';
for (let file of data) {
if(file.name == "index.html") continue;
if(file.type == "dir") {
htmlString += `<li><a href="${file.name}"><DIRECTORY> ${file.name}</a></li>`;
continue;
}
htmlString += `<li><a href="${file.name}">${file.name}</a></li>`;
}
htmlString += '</ul>';
document.getElementsByTagName('body')[0].innerHTML = htmlString;
})()
</script>
<body>
</html>