mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 10:18:12 +01:00
Refactor code :3
This commit is contained in:
parent
2385267dd6
commit
fb43161257
1 changed files with 7 additions and 15 deletions
|
@ -161,29 +161,21 @@ core.video(v).then((data) => {
|
||||||
d = desc.toString().replace(/\n/g, " <br> ");
|
d = desc.toString().replace(/\n/g, " <br> ");
|
||||||
}
|
}
|
||||||
|
|
||||||
let support;
|
const support = (String(inv_vid.description) !== "[object Object]") ? (PATREON_REGEX.exec(inv_vid.description) ?? {}).groups : undefined;
|
||||||
if (String(inv_vid.description) !== "[object Object]") {
|
|
||||||
support = (PATREON_REGEX.exec(inv_vid.description) ?? {}).groups;
|
|
||||||
}
|
|
||||||
|
|
||||||
let badges = "";
|
let badges = "";
|
||||||
let comments = "";
|
let comments = "";
|
||||||
let nnn = "";
|
let nnn = "";
|
||||||
|
|
||||||
|
if (inv_vid?.error === "The uploader has not made this video available in your country" || inv_vid?.error === "This video is not available") {
|
||||||
if(inv_vid?.error === "The uploader has not made this video available in your country"){
|
res.send("error: " + inv_vid.error + " please refresh the page please qt");
|
||||||
res.send("error : " + inv_vid.error + " please refresh the page please qt ")
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(inv_vid?.error === "This video is not available"){
|
|
||||||
res.send("error : " + inv_vid.error + " please refresh the page please qt ")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var uaos = req.useragent.os
|
var uaos = req.useragent.os
|
||||||
const browser = req.useragent.browser;
|
const browser = req.useragent.browser;
|
||||||
const IsOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
|
const IsOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
|
||||||
|
|
||||||
|
if (uaos === "Windows XP" || uaos === "Windows Vista") res.redirect("/lite?v=" + req.query.v);
|
||||||
|
|
||||||
renderTemplate(res, req, "poketube.ejs", {
|
renderTemplate(res, req, "poketube.ejs", {
|
||||||
color: data.color,
|
color: data.color,
|
||||||
|
|
Loading…
Reference in a new issue