only insert ad if its the content view

This commit is contained in:
Anthony 2021-12-08 21:29:16 +01:00 committed by Thomas Zarebczan
parent 1b6dc0fd8b
commit 30cd0644fa

View file

@ -92,6 +92,12 @@ function ChannelContent(props: Props) {
return; 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 () { (async function () {
// test if adblock is enabled // test if adblock is enabled
let adBlockEnabled = false; let adBlockEnabled = false;