Commit 3cbb829 1 parent a79af53 commit 3cbb829 Copy full SHA for 3cbb829
File tree 3 files changed +60
-0
lines changed
3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ theme : jekyll-theme-cayman
Original file line number Diff line number Diff line change
1
+ https://raw.githubusercontent.com/rajbos/actions-marketplace/rajbos/data/actions-data.json
Original file line number Diff line number Diff line change
1
+ <html lang =" en " >
2
+ <head>
3
+ <script type="text/javascript">
4
+ var jsonFileToUrl = 'actions-data-url.txt';
5
+ var jsonUrl = 'actions-data.json';
6
+
7
+ function loadFile(url, isJson, callback) {
8
+ var xobj = new XMLHttpRequest();
9
+ if (isJson) {
10
+ xobj.overrideMimeType("application/json");
11
+ }
12
+
13
+ xobj.open('GET', url, true);
14
+ xobj.onreadystatechange = function () {
15
+ if (xobj.readyState == 4 && xobj.status == "200") {
16
+ // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode
17
+ callback(xobj.responseText);
18
+ }
19
+ };
20
+ xobj.send(null);
21
+ }
22
+
23
+ function init() {
24
+ loadFile(jsonFileToUrl, false, function(response) {
25
+ console.log('found file with content' + response);
26
+ var jsonFileToUrl = response;
27
+
28
+ loadFile(jsonFileToUrl, true, function(response) {
29
+ var json = JSON.parse(response);
30
+
31
+ for(var index in json.actions) {
32
+ var action = json.actions[index];
33
+ document.getElementById('main').innerHTML += '<div class="panel">' + action.repoName + '</div><br />';
34
+ }
35
+ }
36
+ )}
37
+ )};
38
+
39
+
40
+ </script>
41
+
42
+ <style>
43
+ #main {
44
+ border: solid 1px blue;
45
+ }
46
+
47
+ .panel {
48
+ border: solid 1px orange;
49
+ }
50
+ </style>
51
+ </head>
52
+
53
+ <body onload="init()">
54
+ <div id="main">
55
+
56
+ </div>
57
+ </body>
58
+ </html >
You can’t perform that action at this time.
0 commit comments