Skip to content

Commit 476de71

Browse files
author
Sv443
committed
minor fixes
1 parent 7faefb8 commit 476de71

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

docs/raw/index.html

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,10 @@
3535
<meta name="application-name" content="<!--%#INSERT:NAME#%-->">
3636
<meta name="theme-color" content="#101747">
3737

38-
<link rel="icon" type="image/png" href="<!--%#INSERT:DOCSURL#%-->/favicon.ico">
38+
<link rel="icon" type="image/png" href="./favicon.ico">
3939

4040
<!-- IE detection -->
41-
<script>
42-
var isIExp = isIE();
43-
function isIE() {
44-
var ua = window.navigator.userAgent;
45-
var msie = ua.indexOf("MSIE ");
46-
if(msie > 0 || !!navigator.userAgent.match(/Trident.*rv:11\./)) {return true;} // is IE
47-
return false; // other browser
48-
}
49-
50-
if(isIExp === true)
51-
{
52-
alert("Your browser is outdated.\nYou might still be able to view the content but everything interactive will not work.\n\nPlease update to a newer browser like Mozilla Firefox or Google Chrome to view this page correctly.");
53-
}
54-
</script>
41+
<script src="https://sv443.net/cdn/jokeapi/isIE.js" integrity="sha512-SibQCccl2OYEcFF7u++aXdsyBuL0syy24w+arsjj9sPdtvRUKVJHVUq5gGT/AjvDXrNlWZ2tZq9GbVelt2c7eQ==" crossorigin="anonymous"></script>
5542

5643
<!-- #MARKER dependencies -->
5744
<!-- Have to do it like this because the page doesn't always have a trailing slash and that *somehow* makes it redirect to the page root: -->

endpoints/static.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ const call = (req, res, url, params, format) => {
9595
debug("Static", `Serving static content "${requestedFile}" with encoding "${selectedEncoding}"`);
9696

9797
res.setHeader("Content-Encoding", selectedEncoding);
98+
res.setHeader("Cache-Control", "max-age=86400");
9899

99100
return httpServer.pipeFile(res, filePath, mimeType, statusCode);
100101
}

settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const settings = {
173173
docsrecompiled: bgc.yellow + col.blue, // when the docs were recompiled
174174
},
175175
analytics: {
176-
enabled: true, // whether or not the analytics module should be enabled
176+
enabled: false, // whether or not the analytics module should be enabled
177177
dirPath: "./data/analytics/", // path to the analytics directory - needs trailing slash
178178
sqlTableName: "analytics", // name of the SQL table
179179
},

src/logRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const initMsg = (initTimestamp) => {
162162
if(analytics.connectionInfo && analytics.connectionInfo.connected)
163163
console.log(` ├─ Connected to analytics database at ${jsl.colors.fg.green}${analytics.connectionInfo.info}${jsl.colors.rst}`);
164164
else
165-
console.log(` ├─ Analytics database ${jsl.colors.fg.red}not connected${jsl.colors.rst}`);
165+
console.log(` ├─ Analytics database ${settings.analytics.enabled ? jsl.colors.fg.red : jsl.colors.fg.yellow}not connected${settings.analytics.enabled ? "" : " (disabled)"}${jsl.colors.rst}`);
166166
console.log(` ├─ ${settings.info.name} is listening at ${jsl.colors.fg.green}0.0.0.0:${settings.httpServer.port}${jsl.colors.rst}`);
167167
console.log(` └─ Initialization took ${jsl.colors.fg.green}${(new Date().getTime() - initTimestamp).toFixed(0)}ms${jsl.colors.rst}`);
168168
process.stdout.write("\n");

0 commit comments

Comments
 (0)