mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 13:58:13 +01:00
yeah
This commit is contained in:
parent
082f8d3316
commit
52451a70b1
1 changed files with 13 additions and 6 deletions
|
@ -162,9 +162,10 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/web", async (req, res) => {
|
app.get("/im-feeling-lucky", function (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) => {
|
||||||
|
@ -188,12 +189,18 @@ 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.lk === "true") {
|
if (req.query.lucky === 'true') {
|
||||||
getRandomLinkAndRedirect(query, res);
|
res.redirect('/im-feeling-lucky?query=' + query)
|
||||||
}
|
}
|
||||||
|
|
||||||
var uaos = req.useragent.os;
|
var uaos = req.useragent.os;
|
||||||
var IsOldWindows;
|
var IsOldWindows;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue