aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorJoelHMikael <joel.h.kronqvist@gmail.com>2021-12-30 11:18:51 +0200
committerJoelHMikael <joel.h.kronqvist@gmail.com>2021-12-30 11:18:51 +0200
commiteac815eaa7e6e613f055c39ecc1ce5fe50164f43 (patch)
tree59c77a2a65a2e56e9a48ae69d2b031503ad731ea /server.js
parente5bd4fe003b5e8478da3f8a44d95acfcfb1267ac (diff)
downloadLYLLRuoka-eac815eaa7e6e613f055c39ecc1ce5fe50164f43.tar.gz
LYLLRuoka-eac815eaa7e6e613f055c39ecc1ce5fe50164f43.zip
Help icon
Added a (reusable) help icon that shows additional info about what to do on hover.
Diffstat (limited to 'server.js')
-rw-r--r--server.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/server.js b/server.js
index 39c3a38..2f45e95 100644
--- a/server.js
+++ b/server.js
@@ -12,7 +12,8 @@ async function init()
const build = {
"./index.html": buildMain,
"./index.css": buildDefault,
- "./404/index.css": buildDefault
+ "./404/index.css": buildDefault,
+ "./help.png": buildImage
};
const errorPath = "./404/index.html";
@@ -80,7 +81,6 @@ async function buildMain(args)
{
const path = args["path"];
const query = args["query"];
- console.log(query);
const foods = args["foods"];
let index;
if (typeof query.index === "string")
@@ -172,6 +172,13 @@ async function buildDefault(args)
return data.toString("utf-8");
}
+async function buildImage(args)
+{
+ const path = args["path"];
+ const data = await openFile(path);
+ return data;
+}
+
function build_replace(s, dict)
{