-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathorgdb_list.html
More file actions
61 lines (47 loc) · 1.04 KB
/
orgdb_list.html
File metadata and controls
61 lines (47 loc) · 1.04 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
</head>
<body>
<p id="demo"></p>
<script>
loadDoc();
var html = '<table><tr><th>Org PKG Name</th><th>Description</th><th>Updated on</th></tr>';
function myFunction(item, index) {
html += '<tr>'+
'<td>'+item.name+'</td>'+
'<td>'+item.description+'</td>'+
'<td>'+item.updated_at+'</td>'+
'</tr>';
document.getElementById("demo").innerHTML = html;
}
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
github = JSON.parse(this.responseText);
github.forEach(myFunction);
html = '</table>';
}
};
xhttp.open("GET", "https://api.github.com/users/orgdb/repos", true);
xhttp.send();
}
</script>
</body>
</html>