window.__adl__onload_cl_Ept8JOyenWoTUL2r = function __adl__onload_cl_Ept8JOyenWoTUL2r(hash) { var listID = 3919; check_credit_cl(hash); var check = setInterval(function() { check_credit_cl(hash); }, 60000); var html = ''; var css = ''; css += ''; css += ''; css += ''; var $body = document.querySelector("body"); var $adl = document.createElement("div"); $adl.innerHTML = css + html; $body.appendChild($adl); var $viewport = document.querySelector('meta[name="viewport"]'); if ($viewport == null || $viewport.length == 0 || $viewport.length == undefined) { var $head = document.querySelector('head'); $head.innerHTML += ''; } return true; }; (function(hash){ var timer = 0; function load() { if (document.readyState==='complete' || document.readyState === 'interactive') { clearInterval(timer); __adl__onload_cl_Ept8JOyenWoTUL2r(hash); } console.log("Doc state is", document.readyState); } timer = setInterval(load, 200); })('Ept8JOyenWoTUL2r'); if (typeof hide_animate === 'undefined') { function hide_animate(time, element, on_done) { if (element.style.opacity === 0.0) return true; if (!element.style.opacity || element.style.opacity === "") element.style.opacity = 1.0; var resolution = 20; var steps = time / 20; var decrement = parseInt(element.style.opacity == "" ? "1.0" : element.style.opacity) / steps; var intv = setInterval(function() { element.style.opacity -= decrement; if (element.style.opacity <= 0) { element.style.opacity = 0; element.style.visibility = "hidden"; element.style.display = "none"; clearInterval(intv); on_done && on_done(); } }, resolution); }; } if (typeof loadLocker === 'undefined') { function loadLocker(id) { var $locker = document.querySelector('.clocker-' + id); var $overlay = document.querySelector('.clocker-overlay-' + id); if ($locker != null && ($locker.length > 0 || $locker.length == undefined)) { document.querySelector('html').style.overflow = 'hidden'; document.querySelector('body').style.overflow = 'hidden'; $locker.style.display = 'block'; viewcount_cl($locker.getAttribute('data-hash')); if ($overlay != null && ($overlay.length > 0 || $overlay.length == undefined)) { $overlay.style.display = 'block'; } var $offers = document.querySelectorAll('.clocker-offer-' + id); var $offer_area = document.querySelector('#clocker-offer-area-' + id); var $waiting_area = document.querySelector('#clocker-waiting-area-' + id); [].forEach.call($offers, function($offer) { $offer.onclick = function() { hide_animate(500, $offer_area, function() { $waiting_area.style.opacity = 1.0; $waiting_area.style.visibility = "visible"; $waiting_area.style.display = "block"; }); }; }); var iv_counter = 0; var iv = setInterval(function() { valignLocker(id); iv_counter++; if (iv_counter > 50) { clearInterval(iv); } }, 100); window.onresize = function() { valignLocker(id); }; } } } if (typeof valignLocker === 'undefined') { function valignLocker(id) { var $locker = document.querySelector('.clocker-' + id); var valign = $locker.getAttribute('data-valign'); var $overlay = document.querySelector('.clocker-overlay-' + id); var $locker_inner = document.querySelector('.clocker-inner-' + id); var windowheight = window.innerHeight; var lockerheight = $locker_inner.clientHeight; var margin = (windowheight - lockerheight - 100) / 2; if (valign == 'top') { margin = 0; } else { margin = margin > 0 ? margin : 0; } if ($locker != null && ($locker.length > 0 || $locker.length == undefined)) { $locker.style.marginTop = margin + 'px'; if (windowheight < lockerheight) { $locker.style.overflow = 'auto'; } else { $locker.style.overflow = 'visible'; } if ($overlay != null && ($overlay.length > 0 || $overlay.length == undefined)) { $overlay.style.height = windowheight + 'px'; } } } } if (typeof check_credit_cl === 'undefined') { function check_credit_cl(hash) { var r = new XMLHttpRequest(); r.open("POST", "https://www.lockyluke.com/creditcheck.php", true); r.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); r.onreadystatechange = function () { if (r.readyState != 4 || r.status != 200) return true; var response = JSON.parse(r.responseText); if (response['credited'] == true) { if (response['finishing_action'] == 'disapear') { var $locker = document.querySelector('#clocker-' + response['id']); var $overlay = document.querySelector('.clocker-overlay-' + response['id']); if ($locker.length > 0 || $locker.length == undefined) { $locker.style.display = 'none'; if ($overlay.length > 0 || $overlay.length == undefined) { $overlay.style.display = 'none'; } } } else if (response['finishing_action'] == 'redirect_instant') { window.location = response['redirect_url']; } else if (response['finishing_action'] == 'redirect_text') { } else if (response['finishing_action'] == 'dl') { window.location = response['dl_url']; } clearInterval(check); } else if (response['credits'] > 0) { console.log("Not enough convs"); } }; r.send('t=cl&h=' + hash); } } if (typeof viewcount_cl === 'undefined') { function viewcount_cl(hash) { var r = new XMLHttpRequest(); r.open("POST", "https://www.adludum.com/apis/viewcount.php", true); r.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); r.send('t=cl&h=' + hash + '&url=' + encodeURIComponent(window.location.href)); } } if (typeof showOfferArea === 'undefined') { function showOfferArea(id) { var $clocker_waiting_area = document.querySelector('#clocker-waiting-area-' + id); var $clocker_offer_area = document.querySelector('#clocker-offer-area-' + id); hide_animate(500, $clocker_waiting_area, function() { $clocker_offer_area.style.opacity = 1.0; $clocker_offer_area.style.visibility = "visible"; $clocker_offer_area.style.display = "block"; }); } } // 0.015974044799805 // 0.26876711845398