mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 16:28:24 +01:00
add secure instance icon !!
This commit is contained in:
parent
82858e7d58
commit
9bbaecd268
1 changed files with 21 additions and 4 deletions
|
@ -101,6 +101,14 @@ function lightOrDark(color) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function IsInArray(array, id) {
|
||||||
|
for (var i = 0; i < array.length; i++) {
|
||||||
|
if (array[i].id === id) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = function (app, config, renderTemplate) {
|
module.exports = function (app, config, renderTemplate) {
|
||||||
app.get("/encryption", async function (req, res) {
|
app.get("/encryption", async function (req, res) {
|
||||||
var v = req.query.v;
|
var v = req.query.v;
|
||||||
|
@ -167,6 +175,14 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
|
|
||||||
const isvld = await core.isvalidvideo(v);
|
const isvld = await core.isvalidvideo(v);
|
||||||
|
|
||||||
|
var secure;
|
||||||
|
|
||||||
|
if(req.hostname == "poketube.fun" || req.hostname == "poketube.site" || req.hostname == "poketube.online" || req.hostname == "poketube.xyz" || req.hostname == "watch.poketalebot.com") {
|
||||||
|
secure = true
|
||||||
|
} else {
|
||||||
|
secure = false
|
||||||
|
}
|
||||||
|
|
||||||
if (isvld) {
|
if (isvld) {
|
||||||
core.video(v).then((data) => {
|
core.video(v).then((data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
|
@ -212,10 +228,11 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
engagement: engagement,
|
engagement: engagement,
|
||||||
video: json,
|
video: json,
|
||||||
date: k.Video.uploadDate,
|
date: k.Video.uploadDate,
|
||||||
e: e,
|
e,
|
||||||
k: k,
|
k,
|
||||||
process: process,
|
secure,
|
||||||
sha384: sha384,
|
process,
|
||||||
|
sha384,
|
||||||
lightOrDark,
|
lightOrDark,
|
||||||
isMobile: req.useragent.isMobile,
|
isMobile: req.useragent.isMobile,
|
||||||
tj: data.channel,
|
tj: data.channel,
|
||||||
|
|
Loading…
Reference in a new issue