text: document.addEventListener("DOMContentLoaded",function(){var e={isMob:function(){for(var e=navigator.userAgent.toLowerCase(),t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n=!1,a=0;a<t.length;a++)e.indexOf(t[a].toLowerCase())>-1&&(n=!0);return n}()};e.isMob?document.documentElement.className+=" mob":document.documentElement.className+=" pc";var t={$sidebar:document.querySelector("#sidebar"),$main:document.querySelector("#main"),$sidebar_mask:document.querySelector("#sidebar-mask"),$body:document.body,$btn_side:document.querySelector("#header .btn-bar"),$article:document.querySelectorAll(".mob #page-index article"),init:function(){this.bindEvent()}};t.bindEvent=function(){var t=this,n="side",a="click",i="click";e.isMob&&(a="touchstart",i="touchend");for(var s=0;s<this.$article.length;s++)this.$article[s].addEventListener("click",function(){var e=this.getAttribute("data-url");window.location.href=e},!1);this.$btn_side.addEventListener(i,function(){t.$body.className.indexOf(n)>-1?(t.$body.className=t.$body.className.replace(n,""),t.$sidebar_mask.style.display="none"):(t.$body.className+=" "+n,t.$sidebar_mask.style.display="block")},!1),this.$sidebar_mask.addEventListener(a,function(e){t.$body.className=t.$body.className.replace(n,""),t.$sidebar_mask.style.display="none",e.preventDefault()},!1),window.addEventListener("resize",function(){t.$body.className=t.$body.className.replace(n,""),t.$sidebar_mask.style.display="none"},!1)},t.init()},!1);