var url_list = []; var url_found = false; var currentUrl = window.location.host; if(window.location.pathname != ""){ currentUrl = currentUrl + window.location.pathname; } currentUrl = currentUrl.toLowerCase(); for(i in url_list){ url_to_check = url_list[i].toLowerCase(); if(currentUrl.indexOf(url_to_check) !== -1) { url_found = true; break; } } if(url_found == false) { var psyma_desktop = document.createElement("script"); psyma_desktop.type = "text/javascript"; psyma_desktop.src = "//scripts.psyma.com/layer.php?xmlPath=adhoc/adhoc_11200170_w2_bayern3"; document.body.appendChild(psyma_desktop); window.addEventListener('load', function () { initPsymaLayer(); }); } function initPsymaLayer(){ var layerElement = document.getElementById("psyma_layer"); if(layerElement){ return; } if(typeof psymaLayer == 'undefined'){ return; } // check cookie again if(!psymaCookieManager.psyma_show) { return; } psyma_participation = psymaCookieManager.get_psyma_cookie("psyma_participation"); if(psyma_participation == 1 || psyma_participation == 2){ return; } psymaLayer.init(); var layerElement = document.getElementById("psyma_layer"); if(!layerElement){ setTimeout(initPsymaLayer, 3000); } else { psyma_cookie_exp = psymaCookieManager.psyma_get_expiration_date("30"); psymaCookieManager.set_psyma_cookie(psyma_cookie_id, 1, "/", "", "", psyma_cookie_exp); } }