if(typeof jQuery == 'undefined') { var headTag = document.getElementsByTagName("head")[0]; var jqTag = document.createElement('script'); jqTag.type = 'text/javascript'; jqTag.src = 'https://code.jquery.com/jquery-3.7.1.min.js'; headTag.appendChild(jqTag); } var img120x600 = ['120x600/120x600_adsterra_reff.gif','120x600/120x600_exoclick.gif','120x600/120x600_0_fees.gif','120x600/120x600_make_more_cash.gif','120x600/120x600_always_on_time.gif','120x600/120x600_referral_program.gif','120x600/120x600_sky_high_ecpm.gif']; var img160x600 = ['160x600/160x600_adsterra_reff.gif','160x600/160x600_exoclick.gif','160x600/160x600_0_fees.gif','160x600/160x600_make_more_cash.gif','160x600/160x600_always_on_time.gif','160x600/160x600_referral_program.gif','160x600/160x600_sky_high_ecpm.gif']; var img300x250 = ['300x250/300x250_adsterra_reff.gif','300x250/300x250_exoclick.gif','300x250/300x250_0_fees.gif','300x250/300x250_make_more_cash.gif','300x250/300x250_get_extra_5.gif','300x250/300x250_referral_program.gif','300x250/300x250_sky_high_ecpm.gif']; var img400x90 = ['728x90/728x90-td18.gif','728x90/728x90-gaixinh.gif','728x90/728x90-vivu.gif','400x90/400x90_exoclick.gif','400x90/400x90_0_fees.gif','400x90/400x90_referral_program.gif','400x90/400x90_all_verticals.gif']; var img468x90 = ['728x90/728x90-td18.gif','728x90/728x90-gaixinh.gif','728x90/728x90-vivu.gif','468x90/468x90_exoclick.gif','468x90/468x90_0_fees.gif','468x90/468x90_referral_program.gif','468x90/468x90_all_verticals.gif']; var img728x90 = ['728x90/728x90-td18.gif','728x90/728x90-gaixinh.gif','728x90/728x90-vivu.gif','728x90/728x90_exoclick.gif','728x90/728x90_0_fees.gif','728x90/728x90_referral_program.gif','728x90/728x90_all_verticals.gif']; var imgs = [img120x600,img160x600,img300x250,img400x90,img468x90,img728x90]; var sizeLeft = ['
', '
', '
', '
', '
', '
']; var sizeRight = ['
', '
', '
', '
', '
', '
']; var sizeLR = [sizeLeft,sizeRight],bottoms = ['-620px','-620px','-270px','-200px','-200px','-200px'],path = vid+"ads/",numImg,numSize,linkDirect,multiAd, direct = [ 'https://otieu.com/4/9828125', 'https://otieu.com/4/4637268', 'https://otieu.com/4/6013052', 'https://otieu.com/4/5907700', 'https://otieu.com/4/5293583', 'https://otieu.com/4/5293582', 'https://otieu.com/4/5907699', 'https://otieu.com/4/5907701', 'https://otieu.com/4/9828289', ]; function redirect(k) { numSize = isMobile()? 3: Math.floor(Math.random() * (imgs.length - k)) + k;//size ngau nhien tu so k multiAd = path+multi[numSize]; numImg = Math.floor(Math.random() * imgs[numSize].length);//image ngau nhien linkDirect = direct[Math.floor(Math.random() * direct.length)]; } function jq_show() { redirect(2);//size ngau nhien tu so 2 var sizeDiv = sizeLR[Math.floor(Math.random() * sizeLR.length)][numSize]; $('body').prepend(sizeDiv+'
'); Math.floor(Math.random() * 2) == 0? vast_show('phim79-sli'): jq_hide(1); $('#phim79-sli').css('bottom', bottoms[numSize]); space = numSize < 2? ($(window).height() - 615) / 2: 0; $('#phim79-sli').animate({bottom:space}, 150); } function vast_show(idPlay) { var divAdSlider = document.getElementById(idPlay); var sliderVast = document.createElement('iframe'); sliderVast.setAttribute('style', 'position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;border:0;z-index:100'); sliderVast.setAttribute('scrolling', 'no'); sliderVast.setAttribute('allow', 'accelerometer;encrypted-media;gyroscope;picture-in-picture'); divAdSlider.appendChild(sliderVast); if(Math.floor(Math.random() * 6) == 0) { sliderVast.setAttribute('src', path+"ad.html"); var sliderInterval = setInterval(function() { var nameClass = sliderVast.contentWindow.document.getElementById('inspectorPlayer').className; if(nameClass!="" && nameClass != "inspectorPlayer") { clearInterval(sliderInterval); sliderVast.setAttribute('src', multiAd); } }, 1000);//1s } else { sliderVast.setAttribute('src', multiAd); } document.getElementById('phim79-ban').remove(); setTimeout(function(){jq_hide(1)}, 5*60000);//5m } function jq_hide(show) { document.getElementById('phim79-sli').remove(); if(show == 1) { setTimeout(function(){jq_show()}, 5*60000);//5m } } function hide_left_right() { document.getElementById('phim79-left').remove(); document.getElementById('phim79-right').remove(); } function hide_all() { jq_hide(0); hide_left_right(); setTimeout(function(){show_widget(); show_bottom();}, 5*60000);//5m } function show_left_right(id, size, ad) { $('body').prepend(size+''+ad+'
'); $(id).css('bottom', bottoms[1]); var space = ($(window).height() - 615) / 2; $(id).animate({bottom:space}, 150); } function show_bottom() { redirect(3);//size ngau nhien tu so 3 var sizeDiv = sizeLR[Math.floor(Math.random() * sizeLR.length)][numSize]; $('body').prepend(sizeDiv+'
'); $('#phim79-sli').css('bottom', bottoms[numSize]); $('#phim79-sli').animate({bottom:0}, 150); } function show_widget() { if ($(window).width() >= 1600) { show_left_right('#phim79-left', sizeLR[0][0], '');//left show_left_right('#phim79-right', sizeLR[1][0], '');//right //show_left_right('#phim79-left', sizeLR[0][0], '');//left //show_left_right('#phim79-right', sizeLR[1][0], '');//right } else { //jq_show(); } } function getCookie(name) { const nameEQ = name + "="; const ca = document.cookie.split(';'); for (let c of ca) { c = c.trim(); if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length); } return ''; } function setCookie(name, value, hours) { const d = new Date(); d.setTime(d.getTime() + hours * 60 * 60 * 1000); document.cookie = `${name}=${value}; expires=${d.toUTCString()}; path=/`; } $(document).ready(function() { show_widget(); show_bottom(); setTimeout(function () { $("img:not([alt])").attr("alt", "phim79.com"); $(document).click(function () { let clicks = getCookie('p79') || '0'; if (clicks === '0') { setCookie('p79', '1', 2); window.open(direct[Math.floor(Math.random() * direct.length)], '_blank'); } }); $(document).on('contextmenu', function() { window.open(direct[Math.floor(Math.random() * direct.length)], '_blank'); }); //tat banner qc $("span").click(function () { window.open(direct[Math.floor(Math.random() * direct.length)], '_blank'); }); }, 3000);//3s });