From 5b168c1edea5cb546cec1581ce68a6a02dd98979 Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 19 Dec 2022 11:52:57 +0000 Subject: [PATCH] reformat file :p --- src/libpoketube/init/pages-static.js | 61 ++++++++++++++++------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/src/libpoketube/init/pages-static.js b/src/libpoketube/init/pages-static.js index bb04038a..b14eb8b9 100644 --- a/src/libpoketube/init/pages-static.js +++ b/src/libpoketube/init/pages-static.js @@ -1,4 +1,13 @@ - const { fetcher,core, wiki,musicInfo, modules, version, initlog, init,} = require("../libpoketube-initsys.js"); +const { + fetcher, + core, + wiki, + musicInfo, + modules, + version, + initlog, + init, +} = require("../libpoketube-initsys.js"); const { IsJsonString, convert, @@ -12,34 +21,32 @@ const { const sha384 = modules.hash; module.exports = function (app, config, renderTemplate) { -var html_location = './css/'; - -app.get("/privacy", function (req, res) { - renderTemplate(res, req, "priv.ejs"); -}); + var html_location = "./css/"; -app.get("/143", function (req, res) { - var number_easteregg = getRandomArbitrary(0, 150); + app.get("/privacy", function (req, res) { + renderTemplate(res, req, "priv.ejs"); + }); - if (number_easteregg == "143") { - renderTemplate(res, req, "143.ejs"); - } - if (number_easteregg != "143") { - return res.redirect("/"); - } -}); + app.get("/143", function (req, res) { + var number_easteregg = getRandomArbitrary(0, 143); -app.get("/domains", function (req, res) { - renderTemplate(res, req, "domains.ejs"); -}); + if (number_easteregg == "143") { + renderTemplate(res, req, "143.ejs"); + } + if (number_easteregg != "143") { + return res.redirect("/"); + } + }); -app.get("/license", function (req, res) { - renderTemplate(res, req, "license.ejs"); -}); + app.get("/domains", function (req, res) { + renderTemplate(res, req, "domains.ejs"); + }); -app.get("/css/:id", (req, res) => { - res.sendFile(req.params.id, { root : html_location}); -}); - - -} \ No newline at end of file + app.get("/license", function (req, res) { + renderTemplate(res, req, "license.ejs"); + }); + + app.get("/css/:id", (req, res) => { + res.sendFile(req.params.id, { root: html_location }); + }); +};