Skip to content

Commit

Permalink
[web] add index to webpages (#10640)
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner authored Jun 27, 2022
1 parent 00fce38 commit 334a103
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions common/src/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index of Available Pages</title>
</head>
<body>
<script>
(async () => {
const response = await fetch('https://api.github.com/repos/SeleniumHQ/selenium/git/trees/gh-pages?recursive=true');
const data = await response.json();
const list = data.tree
let htmlString = '<ul>';

for (let item of list) {
const name = item.path;
if (name.substring(0, 1) !== 'w') { continue; }
if (name.substring(name.length-4, name.length) !== 'html') { continue; }
const val = name.substring(4, name.length);
htmlString += `<li><a href="${val}">${val}</a></li>`;
}

htmlString += '</ul>';
document.getElementsByTagName('body')[0].innerHTML = htmlString;
})()
</script>
</body>
</html>

0 comments on commit 334a103

Please sign in to comment.