File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < title > Index of Available Pages</ title >
6
+ </ head >
7
+ < body >
8
+ < script >
9
+ ( async ( ) => {
10
+ const response = await fetch ( 'https://api.github.com/repos/SeleniumHQ/selenium/git/trees/gh-pages?recursive=true' ) ;
11
+ const data = await response . json ( ) ;
12
+ const list = data . tree
13
+ let htmlString = '<ul>' ;
14
+
15
+ for ( let item of list ) {
16
+ const name = item . path ;
17
+ if ( name . substring ( 0 , 1 ) !== 'w' ) { continue ; }
18
+ if ( name . substring ( name . length - 4 , name . length ) !== 'html' ) { continue ; }
19
+ const val = name . substring ( 4 , name . length ) ;
20
+ htmlString += `<li><a href="${ val } ">${ val } </a></li>` ;
21
+ }
22
+
23
+ htmlString += '</ul>' ;
24
+ document . getElementsByTagName ( 'body' ) [ 0 ] . innerHTML = htmlString ;
25
+ } ) ( )
26
+ </ script >
27
+ </ body >
28
+ </ html >
You can’t perform that action at this time.
0 commit comments