1
0
mirror of https://github.com/spacebarchat/docs.git synced 2024-11-22 02:02:32 +01:00

Add route counter

This commit is contained in:
Madeline 2023-04-22 18:18:34 +10:00
parent 91250e3061
commit 78c376c30f
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 15 additions and 10 deletions

View File

@ -16,7 +16,11 @@ document
(async () => {
const res = await fetch(MISSING_ROUTES_LIST);
const missingRoutes = await res.json();
const json = await res.json();
const missingRoutes = json.routes;
document.getElementById("counter").innerHTML = `We implement ${json.missing}/${json.discord} endpoints from Discord.com ` +
`as well as ${(json.spacebar + json.missing) - json.discord} additional endpoints.`;
for (let route of missingRoutes) {
const elem = document.createElement("li");

View File

@ -9,15 +9,16 @@ It is generated daily by [{{ repositories.missing_routes }}]({{ repositories.bas
by scraping the latest Discord.com client.
<div>
<div class="fc-search">
<input
id="missing-routes-search"
class="md-input md-input--stretch"
placeholder="Search missing routes"
/>
</div>
<ul id="missing-routes-list">
</ul>
<div class="fc-search">
<input
id="missing-routes-search"
class="md-input md-input--stretch"
placeholder="Search missing routes"
/>
</div>
<p id="counter"></p>
<ul id="missing-routes-list">
</ul>
</div>
<script src="/assets/js/missingroutes.js"></script>