diff --git a/src/libpoketube/init/pages-404-and-main.js b/src/libpoketube/init/pages-404-and-main.js index 0429ba68..ca1b27ff 100644 --- a/src/libpoketube/init/pages-404-and-main.js +++ b/src/libpoketube/init/pages-404-and-main.js @@ -40,8 +40,7 @@ const splash = [ "also try invidious!" ] -const random = - splash[Math.floor(Math.random() * splash.length)]; + function getJson(str) { @@ -96,6 +95,7 @@ module.exports = function (app, config, renderTemplate) { app.get("/:v*?", async function (req, res) { const uaos = req.useragent.os; + const random = splash[Math.floor(Math.random() * splash.length)]; const browser = req.useragent.browser; const isOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox"; @@ -119,4 +119,4 @@ module.exports = function (app, config, renderTemplate) { return rendermainpage(); }); -}; +}; \ No newline at end of file