fxi this lol

This commit is contained in:
Ashley 2023-12-26 15:12:01 +00:00
parent 3ad7aa6f11
commit 43de86922e

View file

@ -162,10 +162,9 @@ module.exports = function (app, config, renderTemplate) {
} }
}); });
app.get("/im-feeling-lucky", function (req, res) { app.get("/web", async (req, res) => {
const query = req.query.query; const query = req.query.query;
const tab = req.query.tab;
const search = require("google-it");
const getRandomLinkAndRedirect = (query, res) => { const getRandomLinkAndRedirect = (query, res) => {
search({ query: `${query}` }).then((results) => { search({ query: `${query}` }).then((results) => {
@ -189,17 +188,10 @@ module.exports = function (app, config, renderTemplate) {
}); });
}; };
getRandomLinkAndRedirect(query, res);
});
app.get("/web", async (req, res) => {
const query = req.query.query;
const tab = req.query.tab;
const search = require("google-it"); const search = require("google-it");
if (req.query.lucky === 'true') { if (req.query.lucky === "true") {
res.redirect('/im-feeling-lucky?query=' + query) getRandomLinkAndRedirect(query, res);
} }
var uaos = req.useragent.os; var uaos = req.useragent.os;
var IsOldWindows; var IsOldWindows;