Advertisements
;(function () { if (document.readyState !== 'loading') { init() } else { window.addEventListener('DOMContentLoaded', init) } const options = { slotName: '/21601254161/AstraOne_in-image', placeId: 'div-gpt-ad-1594203236107-0', } const head = document.querySelector('head') const scriptAdTag = document.createElement('script') scriptAdTag.async = true scriptAdTag.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js' head.appendChild(scriptAdTag) function init() { const script1 = document.createElement('script') script1.text = ` window.googletag = window.googletag || {cmd: []} googletag.cmd.push(function () { googletag .defineSlot('${options.slotName}', [1, 1], '${options.placeId}') .addService(googletag.pubads()) googletag.pubads().enableSingleRequest() googletag.enableServices() }) ` head.appendChild(script1) const images = document.querySelectorAll('#target_image') images.forEach((img) => { const div = document.createElement('div') div.id = options.placeId const script = document.createElement('script') script.type = 'text/javascript' script.text = `googletag.cmd.push(function () { googletag.display('${options.placeId}') })` div.appendChild(script) img.parentNode.insertBefore(div, img.nextSibling) // img.appendChild(div) // document.body.appendChild(div) }) } })()

All posts tagged "Iraq"

More Posts
To Top