From 30cd0644fa5a27c812a5ccb0c7c65524d5b596bd Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 8 Dec 2021 21:29:16 +0100 Subject: [PATCH] only insert ad if its the content view --- ui/component/channelContent/view.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/component/channelContent/view.jsx b/ui/component/channelContent/view.jsx index 5db0c8378..40df3d343 100644 --- a/ui/component/channelContent/view.jsx +++ b/ui/component/channelContent/view.jsx @@ -92,6 +92,12 @@ function ChannelContent(props: Props) { return; } + const urlParams = new URLSearchParams(window.location.search); + const viewType = urlParams.get('view'); + + // only insert ad if it's a content view + if (viewType !== 'content') return; + (async function () { // test if adblock is enabled let adBlockEnabled = false;