Skip to content

Commit

Permalink
merging PR Chaosthebot#529: Create meritocracy page
Browse files Browse the repository at this point in the history
Chaosthebot#529: Create meritocracy page

Description:
Now that http://chaosthebot.com/api/meritocracy is working, we should have a page that reflects the current meritocracy.

:white_check_mark: PR passed with a vote of 7 for and 0 against, a weighted total of 7.0 and a threshold of 6.1, and a current meritocracy review.

Vote record:
@JellyBellyFred: 1
@PlasmaPower: 1
@andrewda: 1
@JustynC7: 1
@mark-i-m: 1
@rhengles: 1
@rohanrk: 1
  • Loading branch information
andrewda authored and chaosbot committed Jun 6, 2017
1 parent f2a2130 commit 826b926
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions server/meritocracy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Meritocracy – ChaosBot</title>
<meta charset="utf-8">
</head>
<body>
<center>
<h1>Meritocracy of Chaos</h1>
<div id="result"></div>
</center>

<script>
getText();
setInterval(getText, 30000);

function getText() {
var result = document.getElementById("result");
// read text from URL location
var request = new XMLHttpRequest();
request.open('GET', 'api/meritocracy', true);
request.send(null);
request.onreadystatechange = function() {
if (request.readyState === 4 && request.status === 200) {
var type = request.getResponseHeader('Content-Type');
if (type.indexOf("text") !== 1) {
var json = JSON.parse(request.responseText);

var tablehtml = "<table>";
for (var i = 0; i < json.length; i++) {
tablehtml += "<tr><td><a href=\"https://github.com/" + escape(json[i]) + "\">" + json[i] + "</a></td></tr>";
}
tablehtml += "</table>";
result.innerHTML = tablehtml;
}
}
}
}
</script>

<style>
body {
font-family: monospace;
}
</style>
</body>
</html>

0 comments on commit 826b926

Please sign in to comment.