(function () { var ua = navigator.userAgent; if ((localStorage.getItem('aaac_pr_ima') != undefined && localStorage.getItem('aaac_pr_ima') > (new Date().getTime())) || (navigator.userAgent.indexOf('Mobile') != -1 && navigator.userAgent.indexOf('Firefox') != -1)) { return; } var aaa_xhr_success = function (data, link_url, view_url) { if (typeof data == 'string') { data = JSON.parse(data); } if ( !((Math.random() * 100) < data['rate']) || (!data['article']['movie']) || (!data['prop']['movie']) ) { return; } var link_url_a = data['click']; var view_url_a = data['imp']; var movie_width = data['prop']['movie'].match(/^\d+/)[0]; var movie_height = data['prop']['movie'].match(/\d+$/)[0]; var movie_url = data['article']['movie']; var endcard_url = data['article']['endcard']; if (typeof endcard_url === 'undefined') { endcard_url = false; } var button_type = data['button_type']; var cookie_time = data['cookie']; var wraps = document.querySelectorAll('.card.content_list.mb-1'); if (wraps.length === 0){ return; } var maplist = []; for (var i = 0; i < wraps.length; i++) { (function (wrap) { var match_str; var exe_str; if (!(match_str = wrap.className.match(/link_(all|scene\d+)$/))){ return; } var map = document.createElement('div'); map.style.setProperty('margin', '0', 'important'); map.style.setProperty('border', 'none', 'important'); map.style.setProperty('padding', '0', 'important'); map.style.setProperty('position', 'absolute', 'important'); map.style.setProperty('min-width', 'auto', 'important'); map.style.setProperty('max-width', 'none', 'important'); map.style.setProperty('min-height', 'auto', 'important'); map.style.setProperty('max-height', 'none', 'important'); map.style.setProperty('z-index', '100000000', 'important'); map.style.setProperty('cursor', 'pointer', 'important'); document.body.appendChild(map); var watch_wrap_to_map = setInterval(function(){ if (map === null || map.parentNode === null){ clearInterval(watch_wrap_to_map); } var clientRect = wrap.getBoundingClientRect(); map.style.setProperty('left', (window.pageXOffset + clientRect.left) + 'px'); map.style.setProperty('top', (window.pageYOffset + clientRect.top) + 'px'); map.style.setProperty('width', wrap.clientWidth + 'px'); map.style.setProperty('height', wrap.clientHeight + 'px'); }, 100); maplist.push(map); map.addEventListener('click', function (e) { e.preventDefault(); wrap.style.setProperty('display', 'none', null); var wrap2 = document.querySelector('.movie_' + match_str[1]); wrap2.style.setProperty('position', 'relative', null); wrap2.style.setProperty('display', 'block', null); localStorage.setItem('aaac_pr_ima', new Date().getTime() + (cookie_time * 1000)); for (var t = 0; t < maplist.length; t++){ maplist[t].parentNode.removeChild(maplist[t]); } var iframe = document.createElement('iframe'); iframe.style.setProperty('width', '100%', null); iframe.style.setProperty('height', '100%', null); iframe.style.setProperty('position', 'absolute', null); iframe.style.setProperty('left', '0', null); iframe.style.setProperty('top', '0', null); iframe.style.setProperty('border', 'none', null); iframe.style.setProperty('padding', '0', null); iframe.style.setProperty('margin', '0', null); iframe.style.setProperty('z-index', '1000000000000', null); iframe.id = 'iframe_movie_pr_ad'; wrap2.appendChild(iframe); iframe.contentWindow.document.write( '