ari.lt/content/js/config/index.js

69 lines
1.4 KiB
JavaScript
Raw Normal View History

2021-09-05 02:21:11 +03:00
const boot = document.getElementById('boot');
const site_name = 'ari-web';
const boot_message = {
0: {
"type": 'ok',
"text": `Booting '${site_name}'...`,
2021-10-09 04:59:39 +03:00
"sleep_time": 0
2021-09-05 02:21:11 +03:00
}
}
2021-09-05 03:57:58 +03:00
const do_sleep = true;
2021-09-05 02:21:11 +03:00
const locations = {
0: {
"url": "https://github.com/TruncatedDinosour/website",
"desc": "The source code of this website",
"aliases": [
2021-10-09 04:59:39 +03:00
"src", "source",
2021-09-05 02:21:11 +03:00
"git", "github"
]
},
1: {
"url": "/",
"desc": "The home page",
"aliases": [
2021-10-09 04:59:39 +03:00
"home", "root",
2021-09-05 02:21:11 +03:00
"index"
]
},
2: {
"url": "/page/reset",
"desc": "Reset your account",
"aliases": [
2021-10-09 04:59:39 +03:00
"reset", "erase",
2021-09-05 02:21:11 +03:00
"del", "delete"
]
},
3: {
"url": "/page/minimal.txt",
"desc": "The minimal page",
"aliases": [
2021-10-09 04:59:39 +03:00
"mini", "minimal",
2021-10-09 03:22:48 +03:00
"txt", "min"
2021-09-05 02:21:11 +03:00
]
2021-09-27 02:33:00 +03:00
},
4: {
"url": "mailto:truncateddinosour@gmail.com",
"desc": "Contact me",
"aliases": [
2021-10-09 04:59:39 +03:00
"contact", "mail",
2021-09-27 02:33:00 +03:00
"email", "gmail"
]
2021-09-05 02:21:11 +03:00
}
}
2021-10-09 04:59:39 +03:00
const escape_HTML = str =>
str.replace(
/[&<>'"]/g,
tag =>
({
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
"'": '&#39;',
'"': '&quot;'
}[tag] || tag)
);