mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 02:17:47 +01:00
dnoreplace :3
This commit is contained in:
parent
8f8b955362
commit
7d8e965624
1 changed files with 11 additions and 4 deletions
15
server.js
15
server.js
|
@ -151,6 +151,7 @@ app.get("/encryption", async function (req, res) {
|
|||
});
|
||||
|
||||
///////////// VIDEO PAGES ETC. /////////////
|
||||
|
||||
app.get("/watch", async function (req, res) {
|
||||
/*
|
||||
* QUERYS
|
||||
|
@ -173,9 +174,11 @@ app.get("/watch", async function (req, res) {
|
|||
const info = await fetch("http://ip-api.com/json/");
|
||||
const jj = await info.text();
|
||||
const ip = JSON.parse(jj);
|
||||
|
||||
var badges = "";
|
||||
|
||||
for (let i = 0; i < 3; i++) {
|
||||
// try 4 times, thanks kuylar
|
||||
for (let i = 0; i < 4; i++) {
|
||||
try {
|
||||
const nightly = await fetch(
|
||||
`https://lighttube-nightly.kuylar.dev/api/video?v=${v}`
|
||||
|
@ -520,11 +523,18 @@ app.get("/channel/", async (req, res) => {
|
|||
var d = "";
|
||||
}
|
||||
|
||||
var dnoreplace = description.toString()
|
||||
if (dnoreplace === "[object Object]") {
|
||||
var dnoreplace = "";
|
||||
}
|
||||
|
||||
|
||||
renderTemplate(res, req, "channel.ejs", {
|
||||
ID: ID,
|
||||
tab: tab,
|
||||
j: k,
|
||||
tj: tj,
|
||||
dnoreplace:dnoreplace,
|
||||
continuation:continuation,
|
||||
wiki: w,
|
||||
getFirstLine:getFirstLine,
|
||||
|
@ -563,9 +573,6 @@ app.get("/js/:id", (req, res) => {
|
|||
res.sendFile(__dirname + `/js/${req.params.id}`);
|
||||
});
|
||||
|
||||
app.get("/video/upload", (req, res) => {
|
||||
res.redirect("https://youtube.com/upload");
|
||||
});
|
||||
|
||||
///////////// API /////////////
|
||||
|
||||
|
|
Loading…
Reference in a new issue