use discover.ejs :3

This commit is contained in:
Ashley 2023-10-06 14:54:03 +00:00
parent d618ca057e
commit 7799ef903b

View file

@ -56,7 +56,7 @@ module.exports = function (app, config, renderTemplate) {
j = getJson(modules.toJson(text)); j = getJson(modules.toJson(text));
} }
renderTemplate(res, req, "main.ejs", { renderTemplate(res, req, "discover.ejs", {
tab: req.query.tab, tab: req.query.tab,
isMobile: req.useragent.isMobile, isMobile: req.useragent.isMobile,
mobilesearch: req.query.mobilesearch, mobilesearch: req.query.mobilesearch,
@ -70,8 +70,7 @@ module.exports = function (app, config, renderTemplate) {
app.get("/:v*?", async function (req, res) { app.get("/:v*?", async function (req, res) {
const uaos = req.useragent.os; const uaos = req.useragent.os;
const browser = req.useragent.browser; const browser = req.useragent.browser;
const isOldWindows = const isOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
(uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
const rendermainpage = () => { const rendermainpage = () => {
if (req.useragent.isMobile) { if (req.useragent.isMobile) {