From a0ff887864b86ad97a1b2e4ab8fb4c5cf98db140 Mon Sep 17 00:00:00 2001 From: Ashley //// Date: Tue, 30 Jan 2024 16:51:59 +0000 Subject: [PATCH] add favicon finally :3 --- src/libpoketube/init/pages-static.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libpoketube/init/pages-static.js b/src/libpoketube/init/pages-static.js index 95b22f2e..489c512e 100644 --- a/src/libpoketube/init/pages-static.js +++ b/src/libpoketube/init/pages-static.js @@ -139,6 +139,10 @@ module.exports = function (app, config, renderTemplate) { const cssDir = "./css/"; + app.get("/favicon.ico", function (req, res) { + res.sendFile("favicon.ico", { root: cssDir }); + }); + app.get("/css/:id", (req, res) => { const filePath = path.join(cssDir, req.params.id); if (!fs.existsSync(filePath)) { @@ -207,7 +211,7 @@ module.exports = function (app, config, renderTemplate) { const js = fs.readFileSync(filePath, "utf8"); const minimizedJs = require("uglify-js").minify(js).code; - + res.header("Content-Type", "text/javascript"); res.send( "// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later" +