dzxstatic
Version:
The static files of Discuz! X
1 lines • 1.52 kB
JavaScript
function htmlGetUserStatus(){var e=new Ajax,t="",n=0,i=[];function a(e,t){var n=null;t>0&&(n=$("_"+e))&&(n.innerHTML=parseInt(t))}function r(e){try{var t=$("lsform");if(t){var n,i=0,a=t.parentNode,r=document.createElement("div");r.innerHTML=e;var c=r.childNodes;for(a.removeChild(t),i=0,n=c.length;i<n;i++)a.appendChild(c[0]);evalscript(e)}}catch(e){d("initUserstatus",e)}}function c(e){try{var t=$("qmenu_menu");if(t){var n=document.createElement("div");n.innerHTML=e,t.parentNode.replaceChild(n.childNodes[0],t),evalscript(e)}}catch(e){d("initQmenu",e)}}function o(e){try{var t=0,n=0,i=document.createElement("div");i.innerHTML=e;var a=i.childNodes,r=$("switchblind"),c="";if(r)for(c=r.parentNode,t=0,n=a.length;t<n;t++)c.appendChild(a[0]);else{var o=$("wp");if(o)for(c=o.parentNode,t=0,n=a.length;t<n;t++)c.insertBefore(a[0],o)}}catch(e){d("initDiynav",e)}}function d(e,t){console&&console.log(e+":"+t)}DYNAMICURL.indexOf("mod=topic")>-1?(t="topic",n=(i=DYNAMICURL.match(/topicid=(\d+)/))?i[1]:0):DYNAMICURL.indexOf("mod=view")>-1&&(t="article",n=(i=DYNAMICURL.match(/aid=(\d+)/))?i[1]:0),e.getJSON("misc.php?mod=userstatus&r="+ +new Date+"&type="+t+"&typeid="+n,(function(e){if(e)for(var t in e)switch(t){case"userstatus":r(e[t]);break;case"qmenu":c(e[t]);break;case"diynav":o(e[t]);break;case"commentnum":case"viewnum":a(t,e[t])}}))}function htmlCheckUpdate(){var e=+new Date/1e3;html_lostmodify&&html_lostmodify<e-300&&$F("make_html",[SITEURL+DYNAMICURL+(DYNAMICURL.indexOf("?")<0?"?":"&")+"_makehtml"],"makehtml")}