mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 23:57:50 +01:00
add school proxy stuff yeah 4r3wedtgerdf
This commit is contained in:
parent
8c5ba7945f
commit
956465586f
1 changed files with 24 additions and 11 deletions
|
@ -90,7 +90,11 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
|
|
||||||
const search = require("google-it");
|
const search = require("google-it");
|
||||||
|
var media_proxy = config.media_proxy;
|
||||||
|
|
||||||
|
if (req.useragent.source.includes("Pardus")) {
|
||||||
|
var media_proxy = "https://media-proxy.ashley0143.xyz";
|
||||||
|
}
|
||||||
var uaos = req.useragent.os;
|
var uaos = req.useragent.os;
|
||||||
var IsOldWindows;
|
var IsOldWindows;
|
||||||
|
|
||||||
|
@ -151,7 +155,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
IsOldWindows,
|
IsOldWindows,
|
||||||
tab,
|
tab,
|
||||||
continuation,
|
continuation,
|
||||||
media_proxy_url: config.media_proxy,
|
media_proxy_url: media_proxy,
|
||||||
results: "",
|
results: "",
|
||||||
q: query,
|
q: query,
|
||||||
summary: "",
|
summary: "",
|
||||||
|
@ -198,8 +202,8 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
|
|
||||||
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)
|
res.redirect("/im-feeling-lucky?query=" + query);
|
||||||
}
|
}
|
||||||
var uaos = req.useragent.os;
|
var uaos = req.useragent.os;
|
||||||
var IsOldWindows;
|
var IsOldWindows;
|
||||||
|
@ -257,11 +261,20 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
app.get("/channel/", async (req, res) => {
|
app.get("/channel/", async (req, res) => {
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
try {
|
try {
|
||||||
|
var media_proxy = config.media_proxy;
|
||||||
|
|
||||||
|
if (req.useragent.source.includes("Pardus")) {
|
||||||
|
var media_proxy = "https://media-proxy.ashley0143.xyz";
|
||||||
|
}
|
||||||
|
|
||||||
var ID = req.query.id;
|
var ID = req.query.id;
|
||||||
|
|
||||||
if (ID.endsWith('@youtube.com')) {
|
if (ID.endsWith("@youtube.com")) {
|
||||||
ID = ID.slice(0, -'@youtube.com'.length);
|
ID = ID.slice(0, -"@youtube.com".length);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ID.endsWith("@poketube.fun")) {
|
||||||
|
ID = ID.slice(0, -"@poketube.fun".length);
|
||||||
}
|
}
|
||||||
const tab = req.query.tab;
|
const tab = req.query.tab;
|
||||||
const cache = {};
|
const cache = {};
|
||||||
|
@ -368,7 +381,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
cinv,
|
cinv,
|
||||||
convert,
|
convert,
|
||||||
turntomins,
|
turntomins,
|
||||||
media_proxy_url: config.media_proxy,
|
media_proxy_url: media_proxy,
|
||||||
dnoreplace,
|
dnoreplace,
|
||||||
getThumbnailUrl,
|
getThumbnailUrl,
|
||||||
continuation,
|
continuation,
|
||||||
|
|
Loading…
Reference in a new issue