Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Readme

A web interface for viewing a bunch of Lichess TV games.

https://jdan-lichessDashboard.web.val.run

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { lichessGameAscii } from "https://esm.town/v/jdan/lichessGameAscii";
import { lichessTVGames } from "https://esm.town/v/jdan/lichessTVGames";
export const lichessDashboard = async () => {
const games = await lichessTVGames();
const validGameTypes = [
"Bot",
"UltraBullet",
"Bullet",
"Computer",
"Rapid",
"Top Rated",
"Blitz",
"Classical",
];
const boards = await Promise.all(validGameTypes.map(async (gameType) => {
const gameId = games[gameType].gameId;
return `
<a href="https://lichess.org/tv/${
gameType === "Top Rated" ? "best" : gameType.toLowerCase()
}">${gameType}</a>
<pre>${await lichessGameAscii(gameId)}</pre>
`;
}));
const html = `
<!doctype html>
<head>
<style>body { margin: 24px }</style>
</head>
<body>
${boards.join("\n")}
</body>
`;
return new Response(html, {
headers: {
"Content-Type": "text/html",
},
});
};
jdan-lichessdashboard.web.val.run
October 23, 2023