Files
minisrv/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/charmap.js
zefie c2a3081afd v0.9.36
- BREAKING CHANGE from v0.9.35 and eariler: Move accounts into subfolder of SessionStore
 - viewergen and viewer updates from @GraspYonOx
 - new homepage theme inspired by @GraspYonOx
 - connect setup also mostly by @GraspYonOx
 - numerous bug fixes
 - nntp-server-zefie is now on npmjs
 - implement proper nodejs debugging
   - will start to phase out using console.log for actual debugging
   - existing "debug" (verbose) messages will stay as is
   - future code debugging will use debug() to debug WIP, therefore not showing to most users if it is accidently left in
2022-11-29 08:29:31 -05:00

49 lines
1010 B
JavaScript

var minisrv_service_file = true;
var num_per_line = 4
var legend_every = 6;
function getLegend() {
d = "<tr>\n";
for (var i = 0; i < num_per_line; i++) {
d += "<td><b><font color=44cc55>Code</font></b>\n<td><b><font color=44cc55>Char</font></b>\n";
}
d += "<tr>\n";
return d;
}
headers = `200 OK
Content-Type: text/html`;
data = `<html>
<body>
<display nosave nosend>
<title>WebTV Character Map</title>
<sidebar width=20%>
<img src="wtv-tricks:/images/Favorites_bg2.jpg">
</sidebar>
<body bgcolor="#191919" text="#33bb44" link="36d5ff" vlink="36d5ff" vspace=0>
<br>
<br>
<font color=44cc55><h1>WebTV Character Map</h1></font>
<br>
<table border=1>`;
for (var i = 0; i <= 255; i++) {
if (i % num_per_line === 0) {
if (i % (num_per_line * legend_every) === 0) {
data += getLegend();
} else {
data += "<tr>"
}
}
data += "<td>&amp;#" + i + ";\n";
data += "<td>&#" + i + ";\n";
}
data += `</table>
</body>
</html>
`