Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] add index to webpages #10640

Merged
merged 1 commit into from Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions common/src/web/index.html
@@ -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>