const advertising_1 = (element) => { element.insertAdjacentHTML('beforeend', '<'+'div class="adv" id="placement_463460_'+plc463460+'">') AdButler.ads.push({handler: function(opt){ AdButler.register(175092, 463460, [728,90], 'placement_463460_'+opt.place, opt); }, opt: { place: plc463460++, keywords: abkw, domain: 'ads.brandadvance.co.uk', click:'CLICK_MACRO_PLACEHOLDER' }}); } const advertising_2 = (element) => { element.insertAdjacentHTML('beforeend', '<'+'div class="adv" id="placement_463456_'+plc463456+'">'); AdButler.ads.push({handler: function(opt){ AdButler.register(175092, 463456, [300,250], 'placement_463456_'+opt.place, opt); }, opt: { place: plc463456++, keywords: abkw, domain: 'ads.brandadvance.co.uk', click:'CLICK_MACRO_PLACEHOLDER' }}); } const advertising_3 = (element) => { element.insertAdjacentHTML('beforeend', '<'+'div class="adv" id="placement_463456_'+plc463456+'">'); AdButler.ads.push({handler: function(opt){ AdButler.register(175092, 463456, [300,250], 'placement_463456_'+opt.place, opt); }, opt: { place: plc463456++, keywords: abkw, domain: 'ads.brandadvance.co.uk', click:'CLICK_MACRO_PLACEHOLDER' }}); } let detectProgramPage = () => { if (location.href.includes('/programs')) { let header = document.querySelector('.cbt-header') if (header) { if (!header.classList.value.includes('touched')) { advertising_1(header) header.classList.add('touched') } } let programRightColumn = document.querySelector('.cbt-tabs--content .col-lg-4') if (programRightColumn) { if (!programRightColumn.classList.value.includes('touched')) { advertising_2(programRightColumn) advertising_3(programRightColumn) programRightColumn.classList.add('touched') } } } setTimeout(() => detectProgramPage(), 500) } detectProgramPage()