From c53d1a57c915db65b41ba324cc2235c8df7e1809 Mon Sep 17 00:00:00 2001 From: ashley Date: Sat, 17 Aug 2024 19:13:24 +0000 Subject: [PATCH] Update src/libpoketube/init/pages-channel-and-download.js --- .../init/pages-channel-and-download.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index 95c271f0..72f8d5e0 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -269,13 +269,22 @@ module.exports = function (app, config, renderTemplate) { getChannelData(channelINVUrl), ]); - var bannedchannels = ["UC1okSIA8UEY8OqvtjGHFvzA"] - if(ID.includes(bannedchannels)) { - var cinv = { - error: "banned from poke for violating code of conduct. you can still watch content but u cant view the channel itself!" +var bannedchannels = ["UC1okSIA8UEY8OqvtjGHFvzA"]; +var bypassQuery = "cG9rZXR1YmVjaGFubmVsYnlwYXNzbG9scGVvcGxldGhpbmt0aGlzaXNjZW5zb3JzaGlwLTQ1OTBh"; + +var bypassExists = req.query.bypass === bypassQuery; +var tabExists = 'tab' in req.query; +var continuationExists = 'continuation' in req.query; + + +if (ID.includes(bannedchannels) && !bypassExists && !tabExists && !continuationExists) { + var cinv = { + error = `this channel was banned for violating the code of conduct. You can still watch content but cannot view the channel itself. If you still wanna view content click here to bypass this restriction.`; } - } +} + + function getThumbnailUrl(video) { const maxresDefaultThumbnail = video.videoThumbnails.find(