mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 07:57:24 +01:00
remove yandere code :3
This commit is contained in:
parent
653625c06f
commit
eb41e742d3
1 changed files with 10 additions and 17 deletions
|
@ -37,14 +37,8 @@ function getJson(str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkUnexistingObject(obj) {
|
function checkUnexistingObject(obj) {
|
||||||
if (obj !== null) {
|
if (Object.hasOwn(obj, "authorId")) {
|
||||||
if (obj.authorId !== null) {
|
return true;
|
||||||
if (obj !== undefined) {
|
|
||||||
if (obj.authorId !== undefined) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,19 +80,18 @@ async function video(v) {
|
||||||
|
|
||||||
var vid = await getJson(video_new_info);
|
var vid = await getJson(video_new_info);
|
||||||
if (checkUnexistingObject(vid)) {
|
if (checkUnexistingObject(vid)) {
|
||||||
|
|
||||||
var a;
|
var a;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var a = await fetch(
|
var a = await fetch(
|
||||||
`${config.tubeApi}channel?id=${vid.authorId}&tab=about`
|
`${config.tubeApi}channel?id=${vid.authorId}&tab=about`
|
||||||
)
|
)
|
||||||
.then((res) => res.text())
|
.then((res) => res.text())
|
||||||
.then((xml) => getJson(toJson(xml)));
|
.then((xml) => getJson(toJson(xml)));
|
||||||
} catch {
|
} catch {
|
||||||
var a = ""
|
var a = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const summary = await wiki
|
const summary = await wiki
|
||||||
.summary(vid.author + " ")
|
.summary(vid.author + " ")
|
||||||
.then((summary_) =>
|
.then((summary_) =>
|
||||||
|
|
Loading…
Reference in a new issue