console.log("THETA DISPLAY"); let thenotebook570x427atf = {} thenotebook570x427atf.pel = document.createElement('script') thenotebook570x427atf.pel.src = '//www.googletagservices.com/tag/js/gpt.js' thenotebook570x427atf.pel.async = true document.head.appendChild(thenotebook570x427atf.pel) thenotebook570x427atf.pel = document.createElement('script') thenotebook570x427atf.pel.src = `https://static.thetamedia.gr/prebid.js?t=1721893585` thenotebook570x427atf.pel.async = true document.head.appendChild(thenotebook570x427atf.pel) thenotebook570x427atf.PREBID_TIMEOUT = 2000; thenotebook570x427atf.FAILSAFE_TIMEOUT = 3000; thenotebook570x427atf._theta_head = window.parent.document.head || window.parent.document.getElementsByTagName('head')[0] thenotebook570x427atf.conf = JSON.parse('{}'.replaceAll('"', '"')) thenotebook570x427atf.sellerId = "111" thenotebook570x427atf.gam = false thenotebook570x427atf.passbackuri = "https://thetamarketplace.com/passback/thenotebook570x427atf" thenotebook570x427atf.hituri = "https://thetamarketplace.com/hit/thenotebook570x427atf/host/false" thenotebook570x427atf.dmp = false thenotebook570x427atf.position = 'thetadisplay' fetch(thenotebook570x427atf.hituri.replace('/host', '/' + window.location.host), { method: 'GET', }) /* var ADS_URL = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; function checkAdsBlocked(callback) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState == XMLHttpRequest.DONE) { callback(xhr.status === 0 || xhr.responseURL !== ADS_URL); } }; xhr.open('HEAD', ADS_URL, true); xhr.send(null); } checkAdsBlocked(function(adsBlocked) { fetch(thenotebook570x427atf.hituri.replace('/host', '/' + window.location.host).replace('/false', '/' + adsBlocked), { method: 'GET', }) return adsBlocked }); */ if(typeof thenotebook570x427atf.conf.position !== "undefined") thenotebook570x427atf.position = thenotebook570x427atf.conf.position thenotebook570x427atf.adUnits = [ { code: 'thetadisplay', mediaTypes: thenotebook570x427atf.conf.mediaTypes, bids: thenotebook570x427atf.conf.bidders } ]; thenotebook570x427atf.consentManagement = { gdpr: { cmpApi: 'iab', timeout: 1000, actionTimeout: 10000, defaultGdprScope: true } } var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; thenotebook570x427atf.pbjsconfig = { enableTIDs: true, currency: { adServerCurrency: 'EUR' }, consentManagement: thenotebook570x427atf.consentManagement, ortb2: { site: { publisher: { domain: location.hostname } }, }, schain: { validation: "strict", config: { ver: "1.0", complete: 1, nodes: [ { asi: "thetamarketplace.com", sid: thenotebook570x427atf.sellerId, hp:1 } ] } }, userSync: { iframeEnabled: true, filterSettings: { iframe: { bidders: '*', filter: 'include', }, }, userIds: [], auctionDelay: 1000, syncDelay: 3000, syncEnabled: true } } if(window.parent.document !== document) { thenotebook570x427atf.passbackins = document.body thenotebook570x427atf.ins = document } else { thenotebook570x427atf.passbackins = document.currentScript.parentElement let t = document.createElement('iframe') t.setAttribute('frameBorder', 0) t.setAttribute('id', `thetadisplay_thenotebook570x427atf`) t.setAttribute('style', 'width:330px; height: 600px;') document.currentScript.parentElement.append(t) thenotebook570x427atf.ins = t.contentWindow.document; thenotebook570x427atf.passbackins = t.contentWindow.document.body; } thenotebook570x427atf.initAdserver = function() { if (thenotebook570x427atf.initAdserverSet) return; thenotebook570x427atf.initAdserverSet = true; let adServerTargeting = pbjs.getAdserverTargetingForAdUnitCode('thetadisplay'); // If any bidders return any creatives if (adServerTargeting && adServerTargeting['hb_adid']) { pbjs.renderAd(thenotebook570x427atf.ins, adServerTargeting['hb_adid']); } else { var script_tag = document.createElement('script') script_tag.src = thenotebook570x427atf.passbackuri script_tag.async = true script_tag.defer = true thenotebook570x427atf.passbackins.appendChild(script_tag) } } window.parent.__tcfapi('addEventListener', 2, function (tcData, success) { if (success) { if (tcData.eventStatus == 'useractioncomplete' || tcData.eventStatus == 'tcloaded') { if(tcData.purpose.consents[1] && tcData.purpose.consents[3] && tcData.purpose.consents[5] && tcData.purpose.consents[7] && tcData.purpose.consents[8] && tcData.purpose.consents[9] && tcData.purpose.consents[10]) { if (tcData.vendor.consents[131]) { thenotebook570x427atf.pbjsconfig.userSync.userIds.push({ name: "id5Id", params: { partner: 1653, externalModuleUrl: 'https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js', }, storage: { type: "html5", name: "id5id", expires: 90, refreshInSeconds: 8 * 3600 } }) } if (tcData.vendor.consents[95]) { thenotebook570x427atf.pbjsconfig.userSync.userIds.push({ name: "lotamePanoramaId", params: { clientId: 17773 } }) } thenotebook570x427atf.pbjsconfig.userSync.userIds.push({ name: "sharedId", storage: { name: "_sharedID", type: "html5", expires: 30 } }) thenotebook570x427atf.pbjsconfig.userSync.userIds.push({ name: "criteo" }) } pbjs.que.push(function() { pbjs.addAdUnits(thenotebook570x427atf.adUnits); pbjs.setConfig(thenotebook570x427atf.pbjsconfig) pbjs.requestBids({ timeout: thenotebook570x427atf.PREBID_TIMEOUT, bidsBackHandler: thenotebook570x427atf.initAdserver }); }); setTimeout(function() { thenotebook570x427atf.initAdserver(); }, thenotebook570x427atf.FAILSAFE_TIMEOUT); if(thenotebook570x427atf.dmp === true) { const stringToUuid = (str) => { str = str.replace('-', ''); return 'xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx'.replace(/[x]/g, function (c, p) { return str[p % str.length]; }); } navigator.mediaDevices .enumerateDevices() .then((devices) => { const uuid = JSON.parse(decodeURIComponent(localStorage.id5id)).universal_uid const source = window.location.host const atype = 1 const text = window.parent.document.body.innerText var formdata = new FormData(); formdata.append('t', text) var requestOptions = { method: 'POST', body: formdata, redirect: 'follow' }; fetch('https://contextual.thetamarketplace.com/', requestOptions) .then(response => response.json()) .then(data => { const key = data.key let ns = document.createElement('noscript') let img = document.createElement('img') img.src = `//dmp.adform.net/dmp/profile/?pid=12269&sg=${key}&eid_${source}_${atype}=${uuid}` img.setAttribute('style', 'display:none !important') ns.appendChild(img) thenotebook570x427atf._theta_head.appendChild(ns) }) }) .catch((err) => { console.log(`${err.name}: ${err.message}`); }); } } } });