diff options
author | Minteck <contact@minteck.org> | 2021-12-04 10:58:59 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-04 10:58:59 +0100 |
commit | e618c3f52c1c4ae161650679cda24eecbba579bb (patch) | |
tree | a160a9f18847be1be73fb1c2ac2bc25b1e756e27 | |
parent | bce13ee94deb2a4914784bb4268dc1d7bc0f11ed (diff) | |
download | wolfeye-js-e618c3f52c1c4ae161650679cda24eecbba579bb.tar.gz wolfeye-js-e618c3f52c1c4ae161650679cda24eecbba579bb.tar.bz2 wolfeye-js-e618c3f52c1c4ae161650679cda24eecbba579bb.zip |
Code is now more cute!
-rw-r--r-- | TODO | 20 | ||||
-rw-r--r-- | data/archives/minteck-autouptime-v1.json (renamed from archives/minteck-autouptime-v1.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-autouptime-v2.json (renamed from archives/minteck-autouptime-v2.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-bettersearch.json (renamed from archives/minteck-bettersearch.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-future.json (renamed from archives/minteck-future.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-game-launcher.json (renamed from archives/minteck-game-launcher.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-horizon.json (renamed from archives/minteck-horizon.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-mpnotes.json (renamed from archives/minteck-mpnotes.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-mprjnet1.json (renamed from archives/minteck-mprjnet1.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-mprjnet3.json (renamed from archives/minteck-mprjnet3.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-mprjnet5.json (renamed from archives/minteck-mprjnet5.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-neutron2.json (renamed from archives/minteck-neutron2.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-neutronstore.json (renamed from archives/minteck-neutronstore.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-plasmawalls.json (renamed from archives/minteck-plasmawalls.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-polymer3.json (renamed from archives/minteck-polymer3.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-pwrite.json (renamed from archives/minteck-pwrite.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-ttshell.json (renamed from archives/minteck-ttshell.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-tysonbots.json (renamed from archives/minteck-tysonbots.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-tysonfans.json (renamed from archives/minteck-tysonfans.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-webserver.json (renamed from archives/minteck-webserver.json) | 0 | ||||
-rw-r--r-- | data/archives/minteck-webspace.json (renamed from archives/minteck-webspace.json) | 0 | ||||
-rw-r--r-- | data/lang/en.json | 57 | ||||
-rw-r--r-- | htdocs/private/version.txt | 2 | ||||
-rw-r--r-- | htdocs/public/TODO/index.ejs | 1 | ||||
-rw-r--r-- | htdocs/public/archive/index.ejs | 23 | ||||
-rw-r--r-- | htdocs/public/index.ejs | 8 | ||||
-rw-r--r-- | htdocs/public/legal/index.ejs | 223 | ||||
-rw-r--r-- | htdocs/public/metranslator/api/index.ejs | 33 | ||||
-rw-r--r-- | htdocs/public/metranslator/index.ejs | 194 | ||||
-rw-r--r-- | htdocs/public/projects/index.ejs | 35 | ||||
-rw-r--r-- | index.js | 2 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | server/gitea.js | 115 | ||||
-rw-r--r-- | server/http.js | 9 |
34 files changed, 369 insertions, 355 deletions
@@ -0,0 +1,20 @@ +- Migrate pages from v8 + - Contents Pages + - /code-of-conduct + - /metranslator + - Redirects + - /contact -> /#/contact + - /creations -> https://gitlab.minteck.org/minteck + - /creations/dev -> /creations + - /creations/dev -> /creations + - /creations/electrode -> https://gitlab.minteck.org/minteck/electrode + - /creations/kartik -> https://kartik.minteck.org + - /creations/neutron -> https://gitlab.minteck.org/minteck/neutron + - /creations/unchained -> https://unchained.minteck.org/home + - /furry -> /#/about + - /oworadio -> / + - /oworadio/credits -> / + - /oworadio/dmca -> / + - /oworadio/along -> / + - /oworadio/source -> / + - /oworadio/vlc -> /
\ No newline at end of file diff --git a/archives/minteck-autouptime-v1.json b/data/archives/minteck-autouptime-v1.json index 309c8a9..309c8a9 100644 --- a/archives/minteck-autouptime-v1.json +++ b/data/archives/minteck-autouptime-v1.json diff --git a/archives/minteck-autouptime-v2.json b/data/archives/minteck-autouptime-v2.json index ac3dcd7..ac3dcd7 100644 --- a/archives/minteck-autouptime-v2.json +++ b/data/archives/minteck-autouptime-v2.json diff --git a/archives/minteck-bettersearch.json b/data/archives/minteck-bettersearch.json index a247ba7..a247ba7 100644 --- a/archives/minteck-bettersearch.json +++ b/data/archives/minteck-bettersearch.json diff --git a/archives/minteck-future.json b/data/archives/minteck-future.json index f8b4691..f8b4691 100644 --- a/archives/minteck-future.json +++ b/data/archives/minteck-future.json diff --git a/archives/minteck-game-launcher.json b/data/archives/minteck-game-launcher.json index 5377e6e..5377e6e 100644 --- a/archives/minteck-game-launcher.json +++ b/data/archives/minteck-game-launcher.json diff --git a/archives/minteck-horizon.json b/data/archives/minteck-horizon.json index 77853e0..77853e0 100644 --- a/archives/minteck-horizon.json +++ b/data/archives/minteck-horizon.json diff --git a/archives/minteck-mpnotes.json b/data/archives/minteck-mpnotes.json index 5346d09..5346d09 100644 --- a/archives/minteck-mpnotes.json +++ b/data/archives/minteck-mpnotes.json diff --git a/archives/minteck-mprjnet1.json b/data/archives/minteck-mprjnet1.json index 7f81392..7f81392 100644 --- a/archives/minteck-mprjnet1.json +++ b/data/archives/minteck-mprjnet1.json diff --git a/archives/minteck-mprjnet3.json b/data/archives/minteck-mprjnet3.json index bbf35d6..bbf35d6 100644 --- a/archives/minteck-mprjnet3.json +++ b/data/archives/minteck-mprjnet3.json diff --git a/archives/minteck-mprjnet5.json b/data/archives/minteck-mprjnet5.json index 60565a6..60565a6 100644 --- a/archives/minteck-mprjnet5.json +++ b/data/archives/minteck-mprjnet5.json diff --git a/archives/minteck-neutron2.json b/data/archives/minteck-neutron2.json index 868e3f2..868e3f2 100644 --- a/archives/minteck-neutron2.json +++ b/data/archives/minteck-neutron2.json diff --git a/archives/minteck-neutronstore.json b/data/archives/minteck-neutronstore.json index 51e2b0b..51e2b0b 100644 --- a/archives/minteck-neutronstore.json +++ b/data/archives/minteck-neutronstore.json diff --git a/archives/minteck-plasmawalls.json b/data/archives/minteck-plasmawalls.json index b5ed74e..b5ed74e 100644 --- a/archives/minteck-plasmawalls.json +++ b/data/archives/minteck-plasmawalls.json diff --git a/archives/minteck-polymer3.json b/data/archives/minteck-polymer3.json index ee967c6..ee967c6 100644 --- a/archives/minteck-polymer3.json +++ b/data/archives/minteck-polymer3.json diff --git a/archives/minteck-pwrite.json b/data/archives/minteck-pwrite.json index a00ea7e..a00ea7e 100644 --- a/archives/minteck-pwrite.json +++ b/data/archives/minteck-pwrite.json diff --git a/archives/minteck-ttshell.json b/data/archives/minteck-ttshell.json index 4b8cf38..4b8cf38 100644 --- a/archives/minteck-ttshell.json +++ b/data/archives/minteck-ttshell.json diff --git a/archives/minteck-tysonbots.json b/data/archives/minteck-tysonbots.json index f524edd..f524edd 100644 --- a/archives/minteck-tysonbots.json +++ b/data/archives/minteck-tysonbots.json diff --git a/archives/minteck-tysonfans.json b/data/archives/minteck-tysonfans.json index dc73b03..dc73b03 100644 --- a/archives/minteck-tysonfans.json +++ b/data/archives/minteck-tysonfans.json diff --git a/archives/minteck-webserver.json b/data/archives/minteck-webserver.json index 48423d0..48423d0 100644 --- a/archives/minteck-webserver.json +++ b/data/archives/minteck-webserver.json diff --git a/archives/minteck-webspace.json b/data/archives/minteck-webspace.json index 1b866b3..1b866b3 100644 --- a/archives/minteck-webspace.json +++ b/data/archives/minteck-webspace.json diff --git a/data/lang/en.json b/data/lang/en.json index cb55ffa..8ccbe8b 100644 --- a/data/lang/en.json +++ b/data/lang/en.json @@ -3,7 +3,8 @@ "copyright": "All rights reserved", "source": "Source Code", "legal": "Legal", - "account": "Minteck Account" + "account": "Minteck Account", + "back": "Go back home" }, "main": { "page": "Main page", @@ -125,5 +126,59 @@ "description": "I strive to respect people's privacy, and try not to use services or applications that violate your privacy." } } + }, + "legal": { + "page": "Legal portal", + "intro": { + "title": "Legal Portal", + "description": "This is the page where all legal documents are posted. The warrant canary (at the bottom) is signed using a GPG key, it's very important that you check for the validity of it, as it may have been compromised.", + "pubkey": { + "text": "Click here to view my GPG public key", + "other": "also get it from:", + "fingerprint": "Fingerprint:" + } + }, + "notices": { + "title": "Legal Notices", + "content": { + "intro": "This website is developed, managed and hosted by:", + "developer": "Developed and edited by Minteck", + "management": "Server managed, hosted and installed by Minteck", + "isp": "Internet access managed by" + } + }, + "tos": { + "title": "Terms and Conditions", + "content": [ + "The following Terms and Conditions apply to the following services:", + "Minteck Account", + "UnchainedTech Comments", + "The Minteck services are made of an online authentication service delivered by Minteck that can extend the features of their projects (such as Kartik Online). The Minteck Account service is submitted to the following terms of use:", + "You must not use Minteck Account and any connected application for the following purposes:", + "activity that is illegal in France", + "prevent other users from accessing parts of the service or all the service", + "try to circumvent security systems and escalate privileges", + "publish private information of another user", + "achieve a commercial or professional goal" + ] + }, + "privacy": { + "title": "Privacy Policy", + "content": [ + "We don't use your data other than to strictly provide the service you want. Period.", + "The data we collect is only the data you explicitly give us access to (e.g. via a registration form) is kept for as long as you choose to keep the data on our servers. Upon deletion by the user, we ensure this data is removed from all of our servers.", + "To enforce laws, we may collect additional data (IP address, URL, timestamps, operating system, browser version) upon identification of suspicious activity. This data is deleted every year near January. You can require early deletion of this data if we think there hasn't been any dangerous activity by sending an email to %1legal@minteck.org%2." + ] + }, + "warrant": { + "title": "Warrant Canary" + } + }, + "archives": { + "title": "Archives", + "months": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], + "never": "Never released", + "released": "Officially released", + "download": "Download" } }
\ No newline at end of file diff --git a/htdocs/private/version.txt b/htdocs/private/version.txt index e977f5e..80af6f9 100644 --- a/htdocs/private/version.txt +++ b/htdocs/private/version.txt @@ -1 +1 @@ -9.1.0
\ No newline at end of file +9.1.2
\ No newline at end of file diff --git a/htdocs/public/TODO/index.ejs b/htdocs/public/TODO/index.ejs new file mode 100644 index 0000000..2e2dcaa --- /dev/null +++ b/htdocs/public/TODO/index.ejs @@ -0,0 +1 @@ +<%- fs.readFileSync(serverRoot + "/TODO") %>
\ No newline at end of file diff --git a/htdocs/public/archive/index.ejs b/htdocs/public/archive/index.ejs index 3fdda40..24af393 100644 --- a/htdocs/public/archive/index.ejs +++ b/htdocs/public/archive/index.ejs @@ -1,37 +1,32 @@ -<% global.title = "Archives"; %> +<% global.title = lang.archives.title; %> <%- include(`${private}/header.ejs`) %> <a href="/">← Go back home</a> <hr class="rnbwsquare-separator rnbwsquare-outer"> -<h1>Archives</h1> -<!--<p>This is the page where all my active projects are, it is regularly updated from the projects I created on <a--> -<!-- href="https://source.minteck.org" target="_blank">source.minteck.org</a>. For projects I don't maintain--> -<!-- anymore, refer to the <a href="/archive">Archives</a> page.</p>--> +<h1><%- lang.archives.title %></h1> <div class="grid-3 projects"> <% - const monthNames = ["January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" - ]; + const monthNames = lang.archives.months; archives = []; - for (let archive of fs.readdirSync(serverRoot + "/archives")) { + for (let archive of fs.readdirSync(serverRoot + "/data/archives")) { data = {}; if (archive.endsWith(".json")) { - json = JSON.parse(fs.readFileSync(serverRoot + "/archives/" + archive).toString()) + json = JSON.parse(fs.readFileSync(serverRoot + "/data/archives/" + archive).toString()) data.id = archive.substr(0, archive.length - 5); data.name = json.title; - data.description = json.description.en; + data.description = json.description[slang] ?? json.description.en; data.date = (json.date.substr(3) + json.date.substr(0, 2)) - 1 + 1; if (json.unreleased) { let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01"); - data.info = "<span style='color:gold;'>Never released</span> · " + monthNames[date.getMonth()] + " " + date.getFullYear(); + data.info = "<span style='color:gold;'>" + lang.archives.never + "</span> · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } else { let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01"); - data.info = "Officially released · " + monthNames[date.getMonth()] + " " + date.getFullYear(); + data.info = lang.archives.released + " · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } archives.push(data); @@ -49,7 +44,7 @@ <a href="https://archive.cdn.minteck.org/<%- archive.id %>.zip" target="_blank" - class="big-button big-button-bg3">Download</a> + class="big-button big-button-bg3"><%- lang.archives.download %></a> </p> <p style="text-align: center;"><small><%- archive.info %></small></p> </div> diff --git a/htdocs/public/index.ejs b/htdocs/public/index.ejs index 59b21cd..a004f52 100644 --- a/htdocs/public/index.ejs +++ b/htdocs/public/index.ejs @@ -1,6 +1,8 @@ <% global.title = lang.main.page; %> <%- include(`${private}/header.ejs`) %> +<a href="/TODO">TODO</a> + <div id="intro" style="height:100vh;display:flex;align-items: center;justify-content: center;margin: -20px;"> <div style="text-align: center;"> <img src="/assets/sky.svg" class="sky"> @@ -28,7 +30,7 @@ <img src="/assets/icons/projects.svg" class="main-icon"> <h2 class="main-icon-sub"><%- lang.main.elements.projects.title %></h2> <h3><%- lang.main.elements.projects.description %></h3> - <a href="<%- slang %>/projects" class="big-button bb-main-mobile"><%- lang.main.elements.projects.action %> →</a> + <a href="https://gitlab.minteck.org/users/minteck/projects" target="_blank" class="big-button bb-main-mobile"><%- lang.main.elements.projects.action %> →</a> </div> <div style="text-align: center;"> <img src="/assets/icons/contact.svg" class="main-icon"> @@ -44,7 +46,7 @@ </div> <div style="height: 41px;text-align: center;"> - <a href="<%- slang %>/projects" class="big-button bb-main-desktop"><%- lang.main.elements.projects.action %> →</a> + <a href="https://gitlab.minteck.org/users/minteck/projects" target="_blank" class="big-button bb-main-desktop"><%- lang.main.elements.projects.action %> →</a> </div> <div style="text-align: center;"> <a href="#/contact" class="big-button bb-main-desktop"><%- lang.main.elements.contact.action %> ↓</a> @@ -210,7 +212,7 @@ <div style="text-align: center;"> <h2><%- lang.main.about.archives.title %></h2> <h3><%- lang.main.about.archives.description %></h3> - <a href="<%- slang %>/archive" target="_blank" class="big-button big-button-bg2"><%- lang.main.about.archives.action %> →</a> + <a href="<%- slang %>/archive" class="big-button big-button-bg2"><%- lang.main.about.archives.action %> →</a> </div> <div style="text-align: center;"> <h2><%- lang.main.about.general.title %></h2> diff --git a/htdocs/public/legal/index.ejs b/htdocs/public/legal/index.ejs index db9c215..6888391 100644 --- a/htdocs/public/legal/index.ejs +++ b/htdocs/public/legal/index.ejs @@ -1,20 +1,19 @@ -<% global.title = "Legal portal"; %> +<% global.title = lang.legal.page; %> <%- include(`${private}/header.ejs`) %> -<a href="/">← Go back home</a> +<a href="/">← <%- lang.global.back %></a> <hr class="rnbwsquare-separator rnbwsquare-outer"> -<h1>Legal Portal</h1> -<p>This is the page where all legal documents are posted. All the content is signed using a GPG key, it's very important - that you check for the validity of the legal content you see on this website, as it may have been compromised.</p> +<h1><%- lang.legal.intro.title %></h1> +<p><%- lang.legal.intro.description %></p> <details id="/pubkey"> - <summary style="cursor: pointer;">Click here to view my GPG public key (also get it from: <a - href="https://source.minteck.org/minteck/minteck/raw/branch/trunk/GPG%20key">Git</a>, <a + <summary style="cursor: pointer;"><%- lang.legal.intro.pubkey.text %> (<%- lang.legal.intro.pubkey.other %> <a + href="https://gitlab.minteck.org/minteck/minteck/-/raw/trunk/GPG%20key">Git</a>, <a href="https://bucket.minteck.org/gpg">CDN</a>) </summary> - <b>Fingerprint:</b> <code style="font-family: monospace;">AEA7 73DB 0620 C57C FFB0 7A91 EFBD C684 35A5 + <b><%- lang.legal.intro.pubkey.fingerprint %></b> <code style="font-family: monospace;">AEA7 73DB 0620 C57C FFB0 7A91 EFBD C684 35A5 74B7</code><br> <pre style="font-family:monospace;"> -----BEGIN PGP PUBLIC KEY BLOCK----- @@ -94,11 +93,11 @@ t57Xl7Bb4NLwkD8v+gZillka+3NaYKbaQc9arUMiOWVrKKbAL+60YzlQKe2uHArX <hr> -<h2 id="/notices">Legal Notices</h2> -<p>This website is developed, managed and hosted by:</p> +<h2 id="/notices"><%- lang.legal.notices.title %></h2> +<p><%- lang.legal.notices.content.intro %></p> <ul> - <li>Developed and edited by Minteck</li> - <li>Server managed by Minteck + <li><%- lang.legal.notices.content.developer %></li> + <li><%- lang.legal.notices.content.management %> <ul> <li>Loiret<br> Centre Val-de-Loire<br> @@ -106,7 +105,7 @@ t57Xl7Bb4NLwkD8v+gZillka+3NaYKbaQc9arUMiOWVrKKbAL+60YzlQKe2uHArX </li> </ul> </li> - <li>Internet access managed by Orange SAS (RCS Nanterre 380 129 866) + <li><%- lang.legal.notices.content.isp %> Orange SAS (RCS Nanterre 380 129 866) <ul> <li>111, quai du Président Roosevelt<br> 92130 ISSY-LES-MOULINEAUX<br> @@ -119,184 +118,45 @@ t57Xl7Bb4NLwkD8v+gZillka+3NaYKbaQc9arUMiOWVrKKbAL+60YzlQKe2uHArX </li> </ul> -<details> - <summary>GPG signed: Legal Notices</summary> - <pre style="font-family:monospace;"> ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -Minteck.org Legal Notices -========================= - -This website is developed, managed and hosted by: - -* Developed and edited by Minteck -* Server managed by Minteck - * Loiret - Centre Val-de-Loire - France -* Internet access managed by Orange SAS (RCS Nanterre 380 129 866) - * 111, quai du Président Roosevelt - 92130 ISSY-LES-MOULINEAUX - and domiciled for the purposes hereof - 1 avenue Nelson Mandela - 94745 ARCUEIL - * +33 1 44 44 22 22 - -This message is signed using a GPG key of which you can find the public key on: -https://minteck.org/legal/#/pubkey ------BEGIN PGP SIGNATURE----- - -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+1I4ACgkQ773GhDWl -dLfi/QwApgJnlscqUbYDeolQjVC++RHlhjYvELHLLCku0S0O20McbRTTMvo+ZRxB -ubk5S8zr9Q9/1wBQ4CCqUpRzTLSioIu3tdN7uJp4WVF6YkWofCAih+tRF4NwVNDp -pSi7MTzrRH226GRfyb/G6YXcuRXJniJPibt7P7GST2BKyv+lLhIQUaMSwcwWZKzu -3i1Hc9tD1r0wLaZdaQivTaO4aLXYpKNW76qCH2hXerKsGArB+SEkC3Ul+AztiQkJ -S9BGoVgHUaAA2FUzaw/mFWVeQNu3N1dWw+p+tsnrDulsQwf29601Y1G6scc2A/El -GWq3hwWXvJYHG+WXqrw3i3pJN9EGAozV8lc9PicahNd3m/5h2PHdxrRtz+bzeKc0 -SIwfdsypoMkW1zKMtSki/MAvucg6X6tpLQdGova59bK/1UaKuA0KCVFTIuFc9HA4 -fQXxQ1KPZBrw0vJ2nTjnOCZOVIt0ikUhHHkvLZ3tsU8cSXOJOwCvacNV42wckCLt -SajcnPKI -=osNf ------END PGP SIGNATURE----- - </pre> -</details> - <hr> -<h2 id="/terms">Terms and Conditions</h2> -<p>The following Terms and Conditions apply to the following services:</p> +<h2 id="/terms"><%- lang.legal.tos.title %></h2> +<p><%- lang.legal.tos.content[0] %></p> <ul> - <li>Minteck Account</li> + <li><%- lang.legal.tos.content[1] %></li> <li>Minteck Trunk</li> <li>Kartik Online</li> - <li>UnchainedTech Comments</li> + <li><%- lang.legal.tos.content[2] %></li> </ul> -<p>The Minteck services are made of an online authentication service delivered by Minteck that can extend the features - of their - projects (such as Kartik Online). The Minteck Account service is submitted to the following terms of use:</p> +<p><%- lang.legal.tos.content[3] %></p> -<p>You must not use Minteck Account and any connected application for the following purposes:</p> +<p><%- lang.legal.tos.content[4] %></p> <ul> - <li>activity that is illegal in France</li> - <li>prevent other users from accessing parts of the service or all the service</li> - <li>try to circumvent security systems and escalate privileges</li> - <li>publish private information of another user</li> - <li>achieve a commercial or professional goal</li> + <li><%- lang.legal.tos.content[5] %></li> + <li><%- lang.legal.tos.content[6] %></li> + <li><%- lang.legal.tos.content[7] %></li> + <li><%- lang.legal.tos.content[8] %></li> + <li><%- lang.legal.tos.content[9] %></li> </ul> -<details> - <summary>GPG signed: Terms and Conditions</summary> - <pre style="font-family:monospace;"> ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -Minteck.org Terms and Conditions -================================ - -The following Terms and Conditions apply to the following services: - -* Minteck Account -* Minteck Trunk -* Kartik Online -* UnchainedTech Comments - -The Minteck services are made of an online authentication service -delivered by Minteck that can extend the features of their -projects (such as Kartik Online). The Minteck Account service is -submitted to the following terms of use: - -You must not use Minteck Account and any connected application for the -following purposes: - -* activity that is illegal in France -* prevent other users from accessing parts of the service or all the service -* try to circumvent security systems and escalate privileges -* publish private information of another user -* achieve a commercial or professional goal - -This message is signed using a GPG key of which you can find the public key on: -https://minteck.org/legal/#/pubkey ------BEGIN PGP SIGNATURE----- - -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+1t4ACgkQ773GhDWl -dLdYJgwAnyt2y9B0Wm4MOvRKlalS1BGyvCS3mxVOTLiOoatZn6ZVZjzzi2e3hm/k -lWU1p3W2j3ZthWoI3oF+6Jvx4TTfIrRbN22162faBw6HB+KUKyZvOZen32tel/yX -+w3Hrre1UsO7C2TnIp2Z/t4NPY21P8a+NFYDHwDVRrneC6hjwi1URkn+2H5q4jdw -aYPHeg+ewxHNMedW6+hfb5b1Jsx9xMYu0qA4ObOQhtpKoeTtfYh2IsoNSomTIuTg -ZRlcDVmbZ+BS+f2J0LmcNPkSf51q8JtcM3Ksd7iCY3OqvV7LVjqXLYd8mPRbjBIa -6IMc0f+IKsmxiKvp8I3FRyCLwgW3pW8i5yitlK35YtyJ+SyTnerGtwNjYlkYCZyu -KKCIQ92+FrET1tBccDA0wM9Z/CBEdGOrtl01vmlKCjCnhQXN0YwhFaGRil0rrxXZ -BnFt6reXJbSS3hTpwtVbWJ/Ygjp9JpVofssXuVhVatWd8gVo3V9YOur7ye0Zuo6H -2Qr15MLe -=dBYz ------END PGP SIGNATURE----- - </pre> -</details> - <hr> -<h2 id="/privacy">Privacy Policy</h2> -<p>We don't use your data other than to strictly provide the service you want. Period.</p> -<p>The data we collect is only the data you explicitly give us access to (e.g. via a registration form) is kept for as - long as you choose to keep the data on our servers. Upon deletion by the user, we ensure this data is - removed from all of our servers.</p> -<p>To enforce laws, we may collect additional data (IP address, URL, timestamps, operating system, browser version) upon - identification of suspicious activity. This data is deleted every year near January. You can require early deletion - of this data if we think there hasn't been any dangerous activity by sending an email to <a - href="mailto:legal@minteck.org">legal@minteck.org</a></p> - -<details> - <summary>GPG signed: Privacy Policy</summary> - <pre style="font-family:monospace;"> ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -Minteck.org Privacy Policy -========================== - -We don't use your data other than to strictly provide the service you want. Period. - -The data we collect is only the data you explicitly give us access to (e.g. via a -registration form) is kept for as long as you choose to keep the data on our -servers. Upon deletion by the user, we ensure this data is removed from all of our -servers. - -To enforce laws, we may collect additional data (IP address, URL, timestamps, -operating system, browser version) upon identification of suspicious activity. This -data is deleted every year near January. You can require early deletion of this data -if we think there hasn't been any dangerous activity by sending an email to: -legal@minteck.org ------BEGIN PGP SIGNATURE----- - -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+9UsACgkQ773GhDWl -dLfjvgv/Q5ZvxcnPfQ6Hr/CTD2BgLq8yd2zRn8/f/zuloNZWNuuUqV9kgbe3GVT5 -7Bj8nP/XvHW8i7KQOt2ZuMPUEZDpQDrdOjEP79GnGYvq+YpkATk+rKOgS/656GMr -mT5o78CFdVptscKqmyq+O4B82W2RmvovTNe4yyDmDeRDNno3XuAuBiS6OK4QMf7d -/K4W4LkHmxBaMypimHAqO7UCalTjeRBPPgC/h7/c7c9a/7F+PzAZbtuU8LGNKC4n -mzZZhn12Vc8L80DWFPIrXw/FhR9MFqFd8FZ9xVC/g5ann6PUqp+DqXOTTt+rW6BK -C9p5lidQBb5Tsb3mn3RZQIpumbuy5WkTQp2goUn/3DQXGj/wLP15oGMcExKoK73J -xePZ60AAypxIy01bIxZ6OP5n2evJsqMs2QY+RPbBzZmhtUMFwWMporzfwcCHB6Qx -j5jQhAxfCvrbS9RJbN8AQ//Gs+CgW4pIlTn8f0QCYvNS+L3vususfokLRxeTYQFC -LjxKOq2a -=HIPo ------END PGP SIGNATURE----- - </pre> -</details> +<h2 id="/privacy"><%- lang.legal.privacy.title %></h2> +<p><%- lang.legal.privacy.content[0] %></p> +<p><%- lang.legal.privacy.content[1] %></p> +<p><%- lang.legal.privacy.content[2].replace("%1", "<a href='mailto:legal@minteck.org'>").replace("%2", "</a>") %></p> <hr> -<h2 id="/warrant">Warrant Canary</h2> -<details> - <summary>Show warrant canary</summary> - <pre style="font-family:monospace;"> +<h2 id="/warrant"><%- lang.legal.warrant.title %></h2> +<pre style="font-family:monospace;"> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Minteck.org Warrant Canary ========================== -As of 2021-11-01, Minteck (minteck.org) <legal@minteck.org> +As of 2021-12-01, Minteck (minteck.org) <legal@minteck.org> has received no requests from any government agencies. This message is updated every month between the 1st and 7th @@ -306,18 +166,17 @@ This message is signed using a GPG key of which you can find the public key on: https://minteck.org/legal/#/pubkey -----BEGIN PGP SIGNATURE----- -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+3J4ACgkQ773GhDWl -dLe5Mwv9Exai8UC9N8/6c6yylch2AF6qC1uVDsk1vrzemuIgpbSKffh53p9tdy5E -wh6OQr51+F/8c6DW45RkmjR1q6W07n9HIMnYOp/LdhVR+iemRopJ5DF5ppmkIR9T -uU++XZ8Sxo/TVdjUo2rCIhk/55Dgg+ZtdR96XqeE4y5VBgYTuQzcjYNHDvVEEiNB -k2WmxtUU1aLPrR1E5e+Nt335Kkr3yUTWj2nK793gmAjr2haHC6Xqm3tSTcUBo9qc -1Vv7sjoPGgTcd/sDwQPzW7RQXlh5ipuPvnmDY5CGLEvlalME4JDeOQF5IFCDqsh6 -RWO118Pp/YLjBFh5lpwkwwePIfPnakNA1QlnfVw/25w63es3JZ8TQ6j7W2iGJCjZ -SY/iwxOdxypfDQzL8d1mtK1QHPUqwgJSGZdDoXHHpsMwFAvPhgB9T6pFHFGNombK -RsSq7z80WAXn2SAZCYLO1tvdUdfxBSOvZadAcjP/PX4Mvy5Lokr0uRp92iCImxLZ -9Try1VLC -=+ld4 +iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmGn6UoACgkQ773GhDWl +dLfQJwv+NJhVqG/76EQEukj1i/roC4FCXWEYnQEWpS09NjnE9sFXF6F69TLpilJU +iJO8P8gSRlMAxFXYNrW/vscGqNfCru+DQyzaqYAijTk+aY429hZgm6t6R+c28Mn3 +jjRE+wBHisE3cvWUqUt5rxKdgMmzTK/aVDUsoYp6IxDCmtpRajhVaylgHZ9iSVgh +DxfpYCEWD4kTKMcUUJz5ytIMHphQHDA9/L0D4ixQrqil/38nbrjFrNP0i7puXxMg +sZ0FXd+gsvg03BHWzJzJNuLJJ1+kv1gt3Ng7X36uF0gtzF4xUvv8SU4o6Jsv6xjy +Vs38e+c9DWn4BPlZH7Y2z1i1/tZPEADJysC3yCRnbYZ461mehGtbQkAsIpWyG0n2 +kOmxOAB18MKNzdcxbssLgJge5l4bu3NnFYw08+Wm4YPJEU85uQJ/b9rlYY35qq8+ +iQJ0/WHIR7vyMlizI75E+rEoJ3UvpbUgKD4qDlynD46SiMMawv1gNZ6Vh3B6Hdo3 +ADIB0mxm +=CJH7 -----END PGP SIGNATURE----- </pre> -</details> <%- include(`${private}/footer.ejs`) %>
\ No newline at end of file diff --git a/htdocs/public/metranslator/api/index.ejs b/htdocs/public/metranslator/api/index.ejs new file mode 100644 index 0000000..47800bd --- /dev/null +++ b/htdocs/public/metranslator/api/index.ejs @@ -0,0 +1,33 @@ +<% + + res.writeHead(200, {'Content-Type': "application/json"}); + + if (get['t']) { + if (get['t'] === "en") { + target = "en"; + } else { + target = "mt"; + } + } else { + res.end(); + } + + if (get['u']) { + text = get['u']; + + if (text.length > 500) { + res.end(); + } + + text = text.split("\"").join("''"); + } else { + res.end(); + } + + aw = JSON.parse(child_process.execSync(`cd /mnt/metranslator-api && node index.js api ${target} "${text}"`).toString()); + last = child_process.execSync("cd /mnt/metranslator-api && git log -1 --pretty=format:'%an'") + aw["system"]["version"] = aw["system"]["version"] + "-" + fs.readFileSync("/mnt/metranslator-api/.git/refs/heads/trunk").toString().substr(0, 8); + aw["system"]["last_author"] = last; + aw["call"] = "cd /mnt/metranslator-api && node index.js api {$target} \"{$text}\""; + + %><%- JSON.stringify(aw); %>
\ No newline at end of file diff --git a/htdocs/public/metranslator/index.ejs b/htdocs/public/metranslator/index.ejs new file mode 100644 index 0000000..943d772 --- /dev/null +++ b/htdocs/public/metranslator/index.ejs @@ -0,0 +1,194 @@ +<% global.title = "MeTranslator"; %> +<%- include(`${private}/header.ejs`) %> + +<a href="/">← <%- lang.global.back %></a> + +<hr class="rnbwsquare-separator rnbwsquare-outer"> + +<div class="container" style="min-height: 100vh;margin-left: 5vw;margin-right: 5vw;"> + <style> + mark { + background: transparent; + color: #ff6161; + padding: 0; + font-weight: bold; + } + </style> + + <h2 style="text-align:center;">Metroz Translate</h2> + <p style="text-align:center;">💡 <i>Click one of the languages to invert</i></p> + <div style="display:grid;grid-template-columns: 1fr 1fr;background:#111;padding-top:10px;border-radius:5px;"> + <div> + <a style="cursor:pointer;color: white !important; text-decoration: none;" onclick="switchLangs();"><p + id="lang-source" + style="text-align:center;font-weight:bold;"> + English</p></a> + <textarea maxlength="500" placeholder="Start typing here..." onresize="resizeTarget();" + onchange="process();" + onkeydown="process();" onkeyup="process();" + id="text-source" + style="padding:20px;outline:none;overflow:hidden;resize:none;background: #222;border: none;width: 100%;margin-bottom: -3px;color: #eee;border-right:1px solid #151515;"></textarea> + <script>document.getElementById('text-source').value = "";</script> + </div> + <div> + <a style="cursor:pointer;color: white !important; text-decoration: none;" onclick="switchLangs();"><p + id="lang-target" + style="text-align:center;font-weight:bold;"> + Metroz</p></a> + <div id="text-target" disabled + style="padding:20px;outline:none;overflow:hidden;resize: none;background: #222;border: none;width: 100%;margin-bottom: -3px;color: #eee;"></div> + <script>document.getElementById('text-target').innerText = "";</script> + </div> + </div> + <div id="facts" + style="background:#424242;padding: 3px 10px;width:100%;border-bottom-left-radius:5px;border-bottom-right-radius:5px;"> + <span id="facts-inner">No facts available about this text</span> + </div> + + <details style="margin-top:20px;"> + <summary>Translator Insights</summary> + <ul> + <li>Database Name: <span id="insights-01">n/a</span></li> + <li>Database Version: <span id="insights-02">n/a</span></li> + <li>Database Size: <span id="insights-03">n/a</span></li> + <li>Processing Time: <span id="insights-04">n/a</span></li> + </ul> + </details> +</div> + +<script> + + function switchLangs() { + if (document.getElementById("text-target").innerHTML === "...") return; + + tval = document.getElementById("text-target").innerText; + sval = document.getElementById("text-source").value; + + document.getElementById("text-target").innerText = "..."; + document.getElementById("text-source").value = tval; + + if (document.getElementById("lang-target").innerText === "English") { + document.getElementById("lang-target").innerText = "Metroz"; + document.getElementById("lang-source").innerText = "English"; + } else { + document.getElementById("lang-source").innerText = "Metroz"; + document.getElementById("lang-target").innerText = "English"; + } + + translate(); + } + + typing = false; + + function startTyping() { + typing = true; + document.getElementById("facts-inner").innerText = "Waiting for end of input..."; + document.getElementById("text-target").innerText = "..."; + } + + function stopTyping() { + typing = false; + translate(); + } + + setInterval(() => { + if (typing) stopTyping(); + }, 2000) + + function translate() { + if (document.getElementById("text-source").value.trim() === "") { + document.getElementById("facts-inner").innerText = "No facts available for this text"; + document.getElementById("text-target").innerText = ""; + return; + } + + document.getElementById("facts-inner").innerText = "Translating..."; + document.getElementById("text-target").innerText = "..."; + + if (document.getElementById("lang-target").innerText === "English") { + target = "en"; + } else { + target = "mt"; + } + + document.getElementById("insights-01").innerText = "n/a"; + document.getElementById("insights-02").innerText = "n/a"; + document.getElementById("insights-03").innerText = "n/a"; + document.getElementById("insights-04").innerText = "n/a"; + + window.fetch("/<%- slang %>/metranslator/api?t=" + target + "&u=" + encodeURI(document.getElementById("text-source").value)).then((a) => { + a.blob().then((b) => { + b.text().then((c) => { + try { + data = JSON.parse(c); + + words = data.output.split(" "); + newds = []; + initw = document.getElementById("text-source").value.toLowerCase().split(" "); + + for (word of words) { + if (initw.includes(word)) { + newds.push("<mark>" + word + "</mark>"); + data.facts.push("The word '" + word + "' does not have a translation in " + document.getElementById("lang-target").innerText) + } else { + newds.push(word); + } + } + + if (data.facts.length > 0) { + document.getElementById("facts-inner").innerHTML = "<ul style='margin-bottom: 0;'><li>" + data.facts.join("</li><li>") + "</li></ul>"; + } else { + document.getElementById("facts-inner").innerText = "No facts available for this text"; + } + + document.getElementById("text-target").innerHTML = newds.join(" "); + } catch (e) { + console.error(e); + document.getElementById("text-target").innerHTML = "<i>An error occurred, please try again later<ul><li>You are a developer? Additional details have been displayed in the console</li><li>You are a regular user? Contact the administrators so they fix the problem</li></ul></i>"; + document.getElementById("facts-inner").innerText = "No facts available for this text"; + document.getElementById("insights-01").innerText = "n/a"; + document.getElementById("insights-02").innerText = "n/a"; + document.getElementById("insights-03").innerText = "n/a"; + document.getElementById("insights-04").innerText = "n/a"; + } + + if (data.system.version.startsWith("-")) { + document.getElementById("insights-01").innerText = "n/a"; + document.getElementById("insights-02").innerText = "n/a"; + document.getElementById("insights-03").innerText = "n/a"; + document.getElementById("insights-04").innerText = "n/a"; + } else { + document.getElementById("insights-01").innerText = data.system.name; + document.getElementById("insights-02").innerText = data.system.version + " (last update by " + data.system.last_author + ")"; + document.getElementById("insights-03").innerText = data.system.length + " entries"; + document.getElementById("insights-04").innerText = data.duration + " ms"; + } + resizeTarget() + + if (data.system.version.startsWith("-")) { + document.getElementById("insights-01").innerText = "n/a"; + document.getElementById("insights-02").innerText = "n/a"; + document.getElementById("insights-03").innerText = "n/a"; + document.getElementById("insights-04").innerText = "n/a"; + } + }) + }) + }) + } + + function process() { + resizeTarget() + startTyping() + } + + function resizeTarget() { + size = 167; + + document.getElementById("text-source").style.height = size + "px"; + document.getElementById("text-target").style.height = size + "px"; + } + + resizeTarget() + +</script> +<%- include(`${private}/footer.ejs`) %>
\ No newline at end of file diff --git a/htdocs/public/projects/index.ejs b/htdocs/public/projects/index.ejs deleted file mode 100644 index 88749f9..0000000 --- a/htdocs/public/projects/index.ejs +++ /dev/null @@ -1,35 +0,0 @@ -<% global.title = "Projects"; %> -<%- include(`${private}/header.ejs`) %> - -<a href="/">← Go back home</a> - -<hr class="rnbwsquare-separator rnbwsquare-outer"> - -<h1>Projects</h1> -<p>This is the page where all my active projects are, it is regularly updated from the projects I created on <a - href="https://source.minteck.org" target="_blank">source.minteck.org</a>. For projects I don't maintain - anymore, refer to the <a href="/archive">Archives</a> page.</p> - -<div class="grid-3 projects"> - <% for (let project of JSON.parse(fs.readFileSync(serverRoot + "/global/gitea.json").toString()).sort((a, b) => a.update - b.update).reverse()) { %> - <div class="project"> - <img class="project-icon" src="<%- project.icon ?? "/assets/icons/project.svg" %>"> - <h2 class="project-name"><%- project.name %></h2> - <p class="project-description"><%- project.description %></p> - <p class="project-buttons"> - <% if (project.website !== null) { %> - <a href="<%- project.website %>" target="_blank" class="big-button big-button-bg3 big-button-pt1">Website - </a><a - href="https://source.minteck.org/<%- project.id %>" target="_blank" - class="big-button big-button-bg3 big-button-pt2">View</a> - <% } else { %> - <a - href="https://source.minteck.org/<%- project.id %>" target="_blank" - class="big-button big-button-bg3">View</a> - <% } %> - </p> - </div> - <% } %> -</div> - -<%- include(`${private}/footer.ejs`) %>
\ No newline at end of file @@ -10,8 +10,6 @@ if (cluster.isMaster) { console.log("All Rights Reserved"); console.log(""); - require('child_process').spawn("node", ["gitea.js"], {cwd: "./server", stdio: "inherit"}) - for (let i = 0; i < require('os').cpus().length; i++) { cluster.fork(); } diff --git a/package.json b/package.json index 1d92093..a590f4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "satellite", - "version": "2.2.1", + "version": "2.3.0", "description": "Minteck Sattelite Server, a fork of the Minteck Projects Web Server", "main": "server/core.js", "scripts": { diff --git a/server/gitea.js b/server/gitea.js deleted file mode 100644 index 6b52b72..0000000 --- a/server/gitea.js +++ /dev/null @@ -1,115 +0,0 @@ -global.log = require('./log')
-global.serverRoot = __dirname + "/..";
-global.fs = require('fs')
-log.info("Reading configuration...")
-global.config = require('../global/config.json')
-global.mpws = require('./version');
-
-log.verbose("Initializing Gitea projects refresh...")
-
-function get(url) {
- return {
- stdout: require('child_process').execSync("curl -s -A \"Sattelite/" + mpws.version + "\" -X GET \"https://source.minteck.org/" + url + "\" -H \"accept: application/json\" -H \"authorization: Basic " + fs.readFileSync(serverRoot + "/auth.txt").toString().trim() + "\"")
- };
-}
-
-function giteaRefresh() {
- giteaDataTmp = [];
- repos = [];
-
- log.info("Refreshing Gitea cache...")
-
- orgs_raw = JSON.parse(get("/api/v1/orgs").stdout.toString());
-
- let orgs = [];
- for (let org of orgs_raw) {
- orgs.push(org.username);
- }
-
- log.verbose("Found " + orgs.length + " orgs");
-
- let orgs_mtk = [];
- for (let org of orgs) {
- log.verbose("Gathering members of '" + org + "'...");
- members_raw = JSON.parse(get("/api/v1/orgs/" + org + "/members").stdout.toString());
-
- let members = [];
- for (let member of members_raw) {
- members.push(member.login);
- }
-
- log.verbose("Has " + members.length + " members");
-
- if (members.includes("minteck")) {
- log.verbose("Includes Minteck, adding to list");
- orgs_mtk.push(org);
- } else {
- log.verbose("Doesn't include Minteck, not adding to list");
- }
- }
-
- log.verbose("Minteck part of " + orgs_mtk.length + "/" + orgs.length + " orgs, exclusing themself");
-
- log.verbose("Gathering personal projects");
- personal_raw = JSON.parse(get("/api/v1/users/minteck/repos").stdout.toString());
-
- for (let repo of personal_raw) {
- repos.push(repo.full_name);
- }
-
- for (let org of orgs_mtk) {
- log.verbose("Gathering projects from '" + org + "'");
-
- org_projects_raw = JSON.parse(get("/api/v1/users/" + org + "/repos").stdout.toString());
-
- for (let repo of org_projects_raw) {
- repos.push(repo.full_name);
- }
- }
-
- log.verbose("Found " + repos.length + " projects: " + repos.join(", "));
-
- for (let repo of repos) {
- thisRepo = {};
-
- log.verbose("Gathering info about " + repo);
- repo_data = JSON.parse(get('/api/v1/repos/' + repo).stdout.toString());
-
- if (!repo_data.empty && !repo_data.private && !repo_data.internal && !repo_data.archived && repo_data.full_name !== "minteck/minteck") {
- thisRepo.name = repo_data.full_name.trim() !== "" ? repo_data.full_name : null;
- thisRepo.id = repo_data.full_name.trim() !== "" ? repo_data.full_name : null;
- thisRepo.icon = repo_data.avatar_url.trim() !== "" ? repo_data.avatar_url : null;
- thisRepo.description = repo_data.description.trim() !== "" ? repo_data.description : null;
- thisRepo.size = repo_data.size;
- thisRepo.website = repo_data.website.trim() !== "" ? repo_data.website : null;
- thisRepo.update = new Date(repo_data.updated_at) - 1 + 1;
-
- sattelite_data = JSON.parse(get("/api/v1/repos/" + repo + "/contents/SatteliteGiteaData.txt").stdout.toString());
-
- if (!sattelite_data.documentation_url) {
- thisRepo.name = Buffer.from(sattelite_data.content, "base64").toString();
- }
-
- giteaDataTmp.push(thisRepo);
- }
- }
-
- fs.writeFileSync("../global/gitea.json", JSON.stringify(giteaDataTmp, null, 4));
- log.info("Gitea cache successfully refreshed");
-}
-
-setInterval(() => {
- try {
- giteaRefresh()
- } catch (e) {
- log.error("Gitea projects refresh failed: " + e.message)
- }
-}, 3600000)
-
-setTimeout(() => {
- try {
- giteaRefresh()
- } catch (e) {
- log.error("Gitea projects refresh failed: " + e.message)
- }
-}, 1000)
\ No newline at end of file diff --git a/server/http.js b/server/http.js index c679d95..465b726 100644 --- a/server/http.js +++ b/server/http.js @@ -14,6 +14,8 @@ module.exports.start = function () { http.createServer(function (req, res) { global.res = res; req.url_orig = req.url; + req.url_arg = req.url.split("?")[1]; + req.url = req.url.split("?")[0]; if (req.headers["x-forwarded-for"]) { global.address = req.headers["x-forwarded-for"]; @@ -140,7 +142,12 @@ module.exports.start = function () { 'Set-Cookie': '__mpws_request=' + year + month + day + hour + min + sec }); try { - require('ejs').renderFile(wwwdata + req.url, {wwwdata, private, req, res, slang, lang}, (err, str) => { + if (typeof req.url_arg === "string") { + get = require('querystring').parse(require('url').parse(req.url_orig).query); + } else { + get = {}; + } + require('ejs').renderFile(wwwdata + req.url, {wwwdata, private, req, res, slang, lang, get, fs: require('fs'), child_process: require('child_process')}, (err, str) => { if (err) throw err; res.write(str); res.end(); |