From 8ded6878060f93f807055ae6a4d256b41482d063 Mon Sep 17 00:00:00 2001 From: Ashley //// Date: Sun, 10 Mar 2024 11:51:48 +0000 Subject: [PATCH] use regex :3 --- src/libpoketube/init/pages-static.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libpoketube/init/pages-static.js b/src/libpoketube/init/pages-static.js index 98deadc8..2f1cd54e 100644 --- a/src/libpoketube/init/pages-static.js +++ b/src/libpoketube/init/pages-static.js @@ -197,11 +197,9 @@ module.exports = function (app, config, renderTemplate) { const minimizedCss = new CleanCSS().minify(css).styles; // Serve the minimized CSS file res.header("Content-Type", "text/css"); - res.send( - notice + - " " + - minimizedCss.replace("https://p.poketube.fun", config.p_url) - ); + res.send( + notice + " " + minimizedCss.replace(/https:\/\/p\.poketube\.fun\//g, config.p_url) +); } else { // Serve the original file res.sendFile(req.params.id, { root: html_location });