var html6=`
`; $("div[id='articlebottom']:first").before(html6); var html1=`
`; $("div[id='articlebottom']:first").before(html1); var html9=`
`; $("div[id='pop_page_bottom']:first").before(html9); $.ajax({url:'/xstat/PopTextArtList',data:{'artid':315991,'type':3},cache:false,dataType:"json",success:function(res){var emptydiv=$("div[class='pop_page_text2_empty']:first");console.log('emptydiv',emptydiv);$.each(res,function(i,value){$(emptydiv).after(`
${value.title}
`);});$(emptydiv).remove();}}); $("div[id='articlebottom']:first").remove(); $("div[id='pop_page_bottom']:first").remove(); function openPopArt(id) { if(id<=0)return; try { $.ajax({ url: "//popup.gmja8.com/statin.ashx", data: { 'ids':id,'type':2 }, cache: false, dataType: "script" })} catch (e) { console.log(e); }}; function useCheckInView(element,options={only:true,handle:()=>{}}){const cache=[] typeof element==='string'&&(element=document.querySelector(element));if(!element)return;findAndListenToScrollableDivs(()=>{if(isInViewport(element)&&!cache.includes(element)){if(options.only){cache.push(element)} options.handle();}})} function isInViewport(element){const rect=element.getBoundingClientRect();return(rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth));} function findAndListenToScrollableDivs(handle){const scrollableElements=[document.body,window] function findScrollableElements(el){if(el.scrollHeight>el.clientHeight||el.scrollWidth>el.clientWidth){scrollableElements.push(el);} const children=el.children||[];for(let i=0;i{el.addEventListener('scroll',function(event){handle();});});} useCheckInView('.jiaocha',{only:true,handle:()=>{$.ajax({ url: '//popup.gmja8.com/statin.ashx', data: { 'ids':'134037,133895','type':1,'idtype':1}, cache: false, dataType: 'script'});}}); useCheckInView('.jiaocha2',{only:true,handle:()=>{$.ajax({ url: '//popup.gmja8.com/statin.ashx', data: { 'ids':'134039,133910,134040','type':1,'idtype':2 }, cache: false, dataType: 'script'});}});