function c_antajax(urlstr1,xml){ var xmlHttp; this.cxht= function(){ if(window.ActiveXObject){ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest){ xmlHttp = new XMLHttpRequest(); } }; this.cxht(); xmlHttp.onreadystatechange = function(){ if(xmlHttp.readyState ==4){ if(xmlHttp.status ==200){ c_parseResults(xmlHttp); } } }; xmlHttp.open("POST",urlstr1); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;"); xmlHttp.send(null); } function c_parseResults(xmlHttp){ var r = xmlHttp.responseText; var arr = r.split('::'); var o_s_list = document.getElementById('o_s_list'); if(typeof(o_s_list) =='object'){ try{ var ot = o_s_list.innerHTML; }catch(err){ var ot = 'null'; } } } /* var aurl = "https://c.antpedia.com/ant_count_op.php?id=b2f072671307b47d721298526f0bbf26&url="+encodeURIComponent(document.referrer === '' ? document.URL : document.referrer); c_antajax(aurl); */ (function() { var isPageReady = false; var isUserAction = false; var hasExecuted = false; function executeCount() { if (hasExecuted) return; if (isPageReady && isUserAction) { hasExecuted = true; var events = ['click', 'mousemove', 'wheel', 'keydown', 'touchstart', 'scroll', 'contextmenu']; events.forEach(function(evt) { document.removeEventListener(evt, onUserAction); }); var aurl = "https://c.antpedia.com/ant_count_op.php?id=b2f072671307b47d721298526f0bbf26&url=" + encodeURIComponent(document.referrer === '' ? document.URL : document.referrer); c_antajax(aurl); } } function onUserAction(e) { if (isUserAction) return; isUserAction = true; executeCount(); } var userEvents = ['click', 'mousemove', 'wheel', 'keydown', 'touchstart', 'scroll', 'contextmenu']; userEvents.forEach(function(evt) { document.addEventListener(evt, onUserAction, { passive: true, capture: true }); }); if (document.readyState === 'complete' || document.readyState === 'interactive') { isPageReady = true; executeCount(); } else { document.addEventListener('DOMContentLoaded', function() { isPageReady = true; executeCount(); }); } setTimeout(function() { if (!isPageReady) { isPageReady = true; executeCount(); } }, 3000); })();