(function () { var text = { error: '' }; var MP_SID = "689"; var MP_TYPE = 'goclick'; var MP_TM = "every_sec"; var MP_CLASS = "block_mpay_link"; var MP_LINK = "0"; var START_TS = 1542605803532; var MP_MAX_ITERATIONS = 5; var referrer = encodeURIComponent(document.referrer); if (typeof referrer == "undefined") { referrer = ''; } else { referrer = encodeURIComponent(document.referrer.split('/')[2]); } var settings = { banner_url : '//mp-https.info/banner/', counter_url: '//mp-https.info/banner/counter/' + MP_SID, click_url: '//mp-https.info/banner/today/' + MP_SID + '?refer=' + referrer, }; var callback = 'banner_' + MP_SID + MP_TYPE; var onclick_event = null; var loadJs = function (url, error_handler) { var error_handler = error_handler || false; var script = document.createElement('script'); script.setAttribute('type', 'text/javascript'); script.setAttribute('src', url); if (error_handler) { script.addEventListener('error', error_handler, true); } document.getElementsByTagName('head')[0].appendChild(script); }; var isRealClickunder = function () { return MP_TYPE == 'clickunder' || MP_TYPE == 'goclick'; }; var clearClicksRunning = false; var banner_iterations = 0; var clearDOMevents = isRealClickunder(); var transparencyChecker = null; var clearClicks = function () { document.onclick = undefined; if (clearClicksRunning) { return; } clearClicksRunning = true; window.setInterval(function () { document.onclick = undefined; }, 100); }; var getBlockContainer = function () { var add_type = (MP_TYPE == 'default' ? '' : '_' + MP_TYPE); var container = document.getElementById('MP_block_container_' + MP_SID + add_type); if (!container) { container = document.getElementById('MP_block_container_' + MP_SID); } return container; }; var getRedirectLink = function () { return document.getElementById('mp_redirect_link_' + MP_SID + MP_TYPE); }; var getBannerImg = function () { return document.getElementById('mp_banner_img_' + MP_SID + MP_TYPE); }; var properInnerHtmlSet = function (node, data) { node.innerHTML = data; replaceScriptsRecurse(node); }; function replaceScriptsRecurse(node) { if (node.getAttribute && node.tagName == 'SCRIPT') { var script = document.createElement("script"); script.text = node.innerHTML; if (node.getAttribute('src')) { script.src = node.getAttribute('src'); } node.parentNode.replaceChild(script, node); } else { var i = 0; var children = node.childNodes; while (i < children.length) { replaceScriptsRecurse(children[i]); i++; } } return node; } window[callback] = function (data) { var container = getBlockContainer(); var html_container = document.createElement('div'); html_container.innerHTML = data.html; container.parentNode.insertBefore(html_container, container); if (data.rkn) { var ee = document.createElement("div"); ee.setAttribute("mpay-ignore", "1"); var scrollWidth = document.body.scrollWidth; var scrollHeight = document.body.scrollHeight; ee.style.cssText = "position:absolute;top:0;left:0;width:" + scrollWidth + "px;height:" + scrollHeight + "px;z-index:178888111;background:#fff; color: #000;text-align: center; font-size: 30px;"; ee.innerHTML = "Доступ к материалам сайта из РФ ограничен.
Приносим свои извинения, но для пользователей из РФ данный сайт закрыт"; document.body.appendChild(ee); } if (!data.banner_is_set) { properInnerHtmlSet(container, data.dummy || text.error); banner_iterations = MP_MAX_ITERATIONS; if (window.mpay_banners && window.mpay_banners.length > 0) { (window.mpay_banners.shift())(); } return; } container.style.display = 'none'; container.innerHTML = data.banner; var banner_img = getBannerImg(); var redirect_link = getRedirectLink(); var href = redirect_link.getAttribute('data-href'); redirect_link.setAttribute('data-href', href); var is_safari = isSafari(); var body = document.getElementsByTagName('body')[0]; if (isClickunder()) { banner_iterations = MP_MAX_ITERATIONS; if (is_safari) { body.style.cursor = 'pointer'; } var mpay_click = document.getElementsByClassName(MP_CLASS); if (MP_LINK==1){ var mpay_click_link = document.getElementsByTagName('a'); trueclick = true; for (i = 0; i < mpay_click_link.length; i++) { mpay_click_link[i].onclick = function () { if (trueclick) { openHref(href); delete trueclick; return false; } } } }else if (mpay_click.length) { trueclick = true; for (i = 0; i < mpay_click.length; i++) { mpay_click[i].onclick = function () { if (trueclick) { openHref(href); // window.open(href, "_blank"); delete trueclick; return false; } } } } else { var e = document.createElement("div"); e.setAttribute("mpay-ignore", "1"); var scrollWidth = document.body.scrollWidth; var scrollHeight = document.body.scrollHeight; e.style.cssText = "position:absolute;top:0;left:0;width:" + scrollWidth + "px;height:" + scrollHeight + "px;z-index:16777111;background:transparent"; var stop = 0; onclick_event = function () { if (stop == 1) { return; } stop = 1; onclick_event = function () { }; try { body.onclick = undefined; document.body.removeChild(e); window['mpBlockHide' + MP_SID + MP_TYPE](); } catch (e) { } openHref(href); }; body.onclick = onclick_event; e.onclick = onclick_event; document.addEventListener("click", onclick_event); window.addEventListener("click", onclick_event); body.addEventListener("click", onclick_event); document.body.appendChild(e); }; } if (isHideBanner()) { container.innerHTML = ''; banner_iterations = MP_MAX_ITERATIONS; } if (MP_TYPE.toLowerCase() != 'blind' && MP_TYPE.toLowerCase() != 'fobar') { banner_iterations = MP_MAX_ITERATIONS; } }; var isSafari = function () { return (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) }; var isHideBanner = function () { return isRealClickunder() || getRedirectLink().getAttribute('data-hide-banner') == 'true'; }; var isClickunder = function () { return isRealClickunder() || getRedirectLink().getAttribute('data-clickunder') == 'true'; }; var getHref = function () { return getRedirectLink().getAttribute('data-href'); }; var openHref = function (href) { var nw = window.open(href, '_blank'); if (nw && nw.focus) { nw.focus(); } }; window['mpBlockShow' + MP_SID + MP_TYPE] = function () { getBlockContainer().style.display = 'block' }; window['mpBlocImgShow' + MP_SID + MP_TYPE] = function () { var list = document.getElementsByClassName('to-hide-mpay'); for (var a = 0; a < list.length; a++) { list[a].style.display = "none"; } }; window['mpBlockHide' + MP_SID + MP_TYPE] = function () { if (document.getElementsByTagName('body')[0].style.cursor == 'pointer') { document.getElementsByTagName('body')[0].style.cursor = 'default'; } getBlockContainer().style.display = 'none'; }; window['mpBannerClickHandler' + MP_SID + MP_TYPE] = function () { if (isClickunder()) return; window['mpBlockHide' + MP_SID + MP_TYPE](); var href = getHref(); openHref(href); }; var loadBanner = function () { var ts = new Date().getTime(); var first = 1; if (window.mpay_first) { first = 0; } else { window.mpay_first = 1; } var banner_url = settings.banner_url; banner_url += MP_SID; banner_url += '/' + MP_TYPE; banner_url += '?callback=' + callback; banner_url += '&first=' + first; banner_url += '&refer=' + encodeURIComponent(location.href); banner_url += '&r=' + encodeURIComponent(document.referrer); banner_url += '&_=' + ts; banner_url += '&start=' + START_TS; loadJs(banner_url); }; document.addEventListener('DOMContentLoaded', function () { var skipUpdate = false; var enableTransparencyCheck = false; var detectTransparency = function (element) { if (element == null) { return; } var children = element.children, curr; for (var i = 0; i < children.length; i++) { curr = window.getComputedStyle(children[i]); if (!curr || !children[i].onclick || children[i].getAttribute("mpay-ignore")) { continue; } var transp = curr.opacity < 0.05; if (!transp) { var rgb = curr.backgroundColor.match(/\d+/g); if (rgb.length == 4 && rgb[3] < 5) transp = true; } if (transp) { skipUpdate = true; children[i].onclick = null; children[i].style.zIndex = "-99999"; } } }; transparencyChecker = detectTransparency; document.addEventListener("DOMSubtreeModified", function (e) { if (!clearDOMevents) { return; } if (skipUpdate) { skipUpdate = false; return; } if (enableTransparencyCheck && e.target == document.body) { detectTransparency(e.target); } }, false); enableTransparencyCheck = true; }); var isThereClickunder = function () { return document.getElementById('MP_block_container_' + MP_SID + '_clickunder') || document.getElementById('MP_block_container_' + MP_SID + '_goclick'); }; var startProcess = function (callback) { if (isRealClickunder()) { callback(); } }; window.mpStatCallback = function () { }; function loadClickunder(sec) { var mainProcess = function () { setTimeout(function () { loadBanner(); }, 50); }; setTimeout( function () { startProcess(mainProcess); }, sec); } if (MP_TM == 'every_1_click' || MP_TM == 'every_2_click' || MP_TM == 'every_3_click' || MP_TM == 'every_4_click' || MP_TM == 'every_2_sec' || MP_TM == 'every_10_sec' || MP_TM == 'every_15_sec' || MP_TM == 'every_20_sec') { var JavaScript = { load: function (src, callback) { var script = document.createElement('script'), loaded; script.setAttribute('src', src); if (callback) { script.onreadystatechange = script.onload = function () { if (!loaded) { callback(); // console.log(this); } loaded = true; }; } document.getElementsByTagName('head')[0].appendChild(script); } }; var click_url = settings.click_url; JavaScript.load(click_url, function () { if (lastClick == 0) { if (MP_TM == 'every_1_click' || MP_TM == 'every_2_click' || MP_TM == 'every_3_click' || MP_TM == 'every_4_click') { var click = 0; document.onclick = function () { click = click + 1; if ((MP_TM == 'every_1_click' && click == 1) || (MP_TM == 'every_2_click' && click == 2) || (MP_TM == 'every_3_click' && click == 3) || (MP_TM == 'every_4_click' && click == 4)) { loadClickunder(150); } } } else if (MP_TM == 'every_2_sec' || MP_TM == 'every_10_sec' || MP_TM == 'every_15_sec' || MP_TM == 'every_20_sec') { var sec = 150; if (MP_TM == 'every_2_sec') { sec = 5000; } else if (MP_TM == 'every_10_sec') { sec = 10000; } else if (MP_TM == 'every_15_sec') { sec = 15000; } else if (MP_TM == 'every_20_sec') { sec = 20000; } loadClickunder(sec); } else { loadClickunder(150); } } else { loadClickunder(150); } }); } else { loadClickunder(150); } })();