File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616</ head >
1717
1818< body >
19- < div id ="root "> </ div >
20- < script src ="./index.js "> </ script >
19+ < div id ="root "> </ div > < header > < p > HYF Repository</ p > </ header >
20+ < select id ="select "> </ select >
21+ </ div >
22+ < div id ="container ">
23+ < div id ="left-div "> < table id ="left-table "> </ table > </ div >
24+ < div id ="right-div "> < table id ="right-table "> </ table > </ div >
25+ </ div >
26+ < script >
27+ const xhttp = new XMLHttpRequest ( ) ;
28+ xhttp . onreadystatechange = function ( ) {
29+ if ( this . readyState == 4 && this . status == 200 ) {
30+ const data = JSON . parse ( this . responseText ) ;
31+ const select = document . getElementById ( 'select' ) ;
32+ select . innerHTML = data
33+ . map ( ( opt , i ) => `<option value="${ i } ">${ data [ i ] . name } </option>` )
34+ . join ( '' ) ;
35+
36+ xhttp . open ( 'GET' , 'https://api.github.com/orgs/HackYourFuture/repos?per_page=100' , true ) ;
37+ xhttp . send ( ) ;
38+ }
39+ } ;
40+ </ script >
2141</ body >
2242
23- </ html >
43+ </ html >
You can’t perform that action at this time.
0 commit comments