if (typeof window.view_ga !== 'undefined') {} else { window.view_ga = 1; (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); //ga('create', 'UA-200700137-1', 'auto', {'name': 'UA2007001371'}); //ga('UA2007001371.send', 'pageview'); //ga('create', 'UA-197492185-1', 'auto', {'name': 'UA1974921851'}); } if (typeof inViewport !== "function") { // safe to use the function function inViewport(element) { if (element) { var bb = element.getBoundingClientRect(); return !(bb.top > innerHeight || bb.bottom < 0); } } } if (typeof getViewtop !== "function") { function getViewtop(element) { if (element) { var bb = element.getBoundingClientRect(); return Math.ceil(bb.top / 100) * 100; } } } if (typeof bindviewnew !== "function") { function bindviewnew(myElements = { myElement: '', myElementid: 'post-10291', title: 'title', link: 'link' }) { //bindload(myElementid); console.log(myElements); var targetElement = document.getElementById(myElements.myElementid); //console.log(targetElement); document.addEventListener('scroll', event => { if (inViewport(targetElement)) { if (targetElement.getAttribute('viewed') == "2") { //ga('inread.send', 'event', 'viewnow', myElementid, location.href); targetElement.setAttribute("viewed", "1"); loaddata(myElements.title, myElements.link, getViewtop(targetElement),myElements.myElementid); //ga('inread.send', 'event', 'viewpose', myElementid, getViewtop(targetElement)); //ga('inread.send', 'event', 'loadlocate', myElementid, '' ); } else {} } else {} }) } } if (typeof loaddata !== "function") { function loaddata(pagetitle, pagelocation, pos, pageid) { pos = Math.ceil(window.scrollY / 100) * 100; console.log(pos+'_'+pagetitle); window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('event', 'page_view', { page_title: 'scroll_'+pos+'_'+pagetitle, page_location: encodeURI(pagelocation), send_to: 'G-4ZK2ZVQ5ZT' }) gtag('event', 'page_view', { page_title: 'scroll_'+pos+'_'+pagetitle, page_location: encodeURI(pagelocation), send_to: 'G-TX00ZNMV31' }) gtag('event', 'auto_load_page_view', { send_to: 'G-TX00ZNMV31' }) gtag('event', 'auto_load_'+pageid, { send_to: 'G-TX00ZNMV31' }) gtag('event', 'view', { 'event_category': 'title', 'event_label': pos + '_' +pagetitle, send_to: 'G-4ZK2ZVQ5ZT' }) gtag('event', 'view', { 'event_category': 'title', 'event_label': pos + '_' + pagetitle, send_to: 'G-TX00ZNMV31' }) gtag('event', 'view', { 'event_category': 'pos', 'event_label': pos, send_to: 'G-4ZK2ZVQ5ZT' }) gtag('event', 'view', { 'event_category': 'pos', 'event_label': pos, send_to: 'G-TX00ZNMV31' }) } } if (typeof bindload !== "function") { function bindload(myElementid) { //ga('inread.send', 'event', 'load', myElementid, location.href); //ga('inread.send', 'event', 'loadlocate', myElementid, '' ); } } function loadview(myElements = { myElement: '', myElementid: 'post-10291', title: 'title', link: 'link' }) { console.log(myElements); if (document.getElementById(myElements.myElementid)) {} else { myElements.myElement.insertAdjacentHTML('afterEnd', '
'); bindviewnew(myElements); } } /* (function() { var myElements = { myElement: document.getElementById('post-10341'), myElementid: 'post-10341-view', title: 'title', link: 'link' }; loadview(myElements); })(); */ (function() { var callscript = { showad_slot:"", showad_defineSlot : "/21697024903,152013443/applealmond_inread_p1", showad_defineSlot2 : "/21697024903,152013443/applealmond_inread_p1", showad_name : "div-gpt-ad-1671181372605-applealmond_inread_p1", //showad_defineSize : [ [1, 1] ], showad_defineSize : [[970, 90], [1, 1], [320, 50], [336, 280], [970, 250], [300, 250], [728, 90], [300, 50], [320, 100], [300, 100]], showad_defineSize_mobile : [[1, 1], [320, 50], [336, 280], [300, 250] ], //showad_defineSize_desktop : [[970, 90], [1, 1], [970, 250], [728, 90] ], showad_defineSize_desktop : [[1, 1], [970, 250], [728, 250] ], showad_style : "text-align: center;padding:5px;line-height:280px;", fetchad:function(){ var showad_name = this.showad_name; var showad_div = document.createElement('div'); var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); var check_rate = Math.floor((Math.random() * (100-1)) +1); if( check_rate> 50 ){ callscript.showad_defineSlot = callscript.showad_defineSlot2; } callscript.showad_defineSize = callscript.showad_defineSize_desktop; if (document.body.clientWidth <= 500) { callscript.showad_defineSize = callscript.showad_defineSize_mobile; } showad_div.style = callscript.showad_style; showad_div.id = showad_name; //document.body.appendChild(showad_div); /* if(document.getElementsByClassName('after-header-widget-area').length>0){ document.getElementsByClassName('after-header-widget-area')[0].appendChild(showad_div); } */ if(document.querySelectorAll('div-gpt-ad-1629371337500-0').length>0){ document.querySelectorAll('#div-gpt-ad-1629371337500-0')[0].replaceWith(showad_div); } window.googletag = window.googletag || {cmd: []}; var googletag = window.googletag; googletag.cmd.push(function() { callscript.showad_slot = googletag.defineSlot(callscript.showad_defineSlot,callscript.showad_defineSize, callscript.showad_name) .setTargeting('zi-web', location.hostname).setTargeting('url', location.href).addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); googletag.cmd.push(function() { googletag.display(callscript.showad_name); }); //this.checkad(showad_name); }, fetchad2:function(){ var showad_name = this.showad_name+'_2'; var showad_div = document.createElement('div'); var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); //var check_rate = Math.floor((Math.random() * (100-1)) +1); //if( check_rate> 50 ){ // callscript.showad_defineSlot = callscript.showad_defineSlot2; //} callscript.showad_defineSlot = callscript.showad_defineSlot2; callscript.showad_defineSize = callscript.showad_defineSize_desktop; if (document.body.clientWidth <= 500) { callscript.showad_defineSize = callscript.showad_defineSize_mobile; } //showad_div.style.textAlign = 'center'; //showad_div.style = 'text-align: center;padding:5px;'; showad_div.style = callscript.showad_style; showad_div.id = showad_name; //document.body.appendChild(showad_div); if(document.getElementsByClassName('after-header-widget-area').length>0){ document.getElementsByClassName('after-header-widget-area')[0].appendChild(showad_div); } window.googletag = window.googletag || {cmd: []}; var googletag = window.googletag; googletag.cmd.push(function() { callscript.showad_slot = googletag.defineSlot(callscript.showad_defineSlot,callscript.showad_defineSize, showad_name) .setTargeting('web', location.hostname).setTargeting('url', location.href).addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); googletag.cmd.push(function() { googletag.display(showad_name); }); var googleads = document.getElementById(showad_name); }, checkad:function(showad_name){ var googleads = document.getElementById(showad_name); setTimeout( function(){ if(googleads.childNodes[0]!== undefined){ if(googleads.childNodes[0].childNodes[0]!== undefined){ console.log(googleads.childNodes[0].childNodes[0]); console.log("ad displayed"); }else{ console.log(googleads); console.log("noad"); callscript.fetchad2(); } } },2800); }, async:function (u, c) { var d = document, t = 'script', o = d.createElement(t), s = d.getElementsByTagName(t)[0]; o.src = u; if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); } //s.parentNode.insertBefore(o, s); d.body.appendChild(o); },callad:function(){ if(window.googletag){ this.fetchad(); }else{ this.async('https://www.googletagservices.com/tag/js/gpt.js',this.fetchad()); } } }; setTimeout( function(){ callscript.callad(); },3000); })(); (function(){ var check_rate = Math.floor((Math.random() * (100-1)) +1); var hour = new Date().getHours(); var minCheckRate = (hour >= 5 && hour <= 8) ? 10 : 10; //if( window.location.href.indexOf("232750")>0 || check_rate> 90 ){ if( window.location.href.indexOf("254915")>0 || check_rate> minCheckRate ){ setTimeout(function(){ if (document.body.clientWidth <= 500) { }else{ (function(){ var callscript = {initname:"", getad:function(initname){ //var banner1_top_id = parent.document.getElementsByName(initname)[0].parentNode.parentNode.id; var banner1_top_id = "banner1_top"; //var banner1_top_parent = parent.document.getElementById(banner1_top_id); var banner1_top_div = parent.document.createElement('div'); var banner1_top_div_id = 'banner-'+banner1_top_id; //banner1_top_div.id = banner1_top_div_id; //banner1_top_div.style.textAlign = 'center'; setTimeout(function() { // Select all elements with the class you want to target let elements = document.querySelectorAll('.gliaplayer-container'); // Loop through the elements and set the width to 320px elements.forEach(function(element) { element.style.width = '320px';element.style.margin = '5px'; }); }, 2000); // 1000 milliseconds = 1 second banner1_top_div.innerHTML = '
'; //banner1_top_parent.parentNode.insertBefore(banner1_top_div,banner1_top_parent); var banner1_top = document.createElement("script"); banner1_top.src = "https://player.gliacloud.com/player/applealmond_desktop"; //banner1_top_parent.parentNode.insertBefore(banner1_top,banner1_top_parent); //var banner1_top_parent2 = top.document.querySelectorAll('#custom_html-9'); //var banner1_top_parent2 = top.document.querySelectorAll('.Zi_ad_a_SB'); var banner1_top_parent2 = top.document.querySelectorAll('#zi_hosting_rhs'); if(banner1_top_parent2.length<2){ if(banner1_top_parent2.length>0){ banner1_top_parent2[0].insertAdjacentElement('afterend', banner1_top_div); banner1_top_parent2[0].insertAdjacentElement('afterbegin', banner1_top); } } (function(){function ypabottomnative_check(){var ypabottomnative = top.document.getElementById('ypabottomnative');ypabottomnative_interval_count++; //console.log(ypabottomnative_interval_count); if(ypabottomnative_interval_count>10){clearInterval(ypabottomnative_interval);} if(ypabottomnative){ ypabottomnative.parentNode.style.zIndex="0"; }} var ypabottomnative_interval_count = 0;var ypabottomnative_interval = setInterval(function(){ypabottomnative_check();},2000);}()); } } callscript.getad(this.name); })(this.name); } },1000); } })(); (function(){ if(window.location.href.indexOf("6149285917")>0){ /* if(document.getElementById('ypabottomnative')){ document.getElementById('ypabottomnative').remove(); } */ var styleElement = document.createElement("STYLE"); styleElement.innerHTML = "#ypabottomnative{display:none;}"; document.body.appendChild(styleElement); } var styleElement2 = document.createElement("STYLE"); //styleElement2.innerHTML = "#applealmond_inread_p2{display:none;}"; document.body.appendChild(styleElement2); })(); (function(){ if(window.location.href.indexOf("202464")>0){ var andbeyond_js = document.createElement("script"); andbeyond_js.src="https://rtbcdn.andbeyond.media/prod-global-512658.js"; document.body.appendChild(andbeyond_js); } })();