1 |
- !function(){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,n=-1!==t.indexOf("?")?t.split("?").pop():"",a={};n.replace(/(\w+)(?:=([^&]*))?/g,function(e,t,n){a[t]=n});var c={init:function(){this.comScript(),this.addhmt()},getScript:function(e,t){var n=document.getElementsByTagName("head")[0]||document.documentElement,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.charset="utf-8",a.src=e,a.onload=a.onreadystatechange=function(){(!a.readyState||/loaded|complete/.test(a.readyState))&&("[object Function]"===Object.prototype.toString.call(t)&&t(),a.onload=a.onreadystatechange=null,a.parentNode&&a.parentNode.removeChild(a))},n.insertBefore(a,null)},loadStyleString:function(e){var t=document.createElement("style");t.type="text/css";try{t.appendChild(document.createTextNode(e))}catch(n){t.styleSheet.cssText=e}var a=document.getElementsByTagName("head")[0];a.appendChild(t)},comScript:function(){for(var e=(window._hmt||[],["//pub.ouj.com/common/js/duowan.js","//hm.baidu.com/hm.js?a23a522269c249986e4e7039f5808f80"]),t=0,n=e.length;n>t;t++)this.getScript(e[t])},addhmt:function(){var e=location.hostname,t="";switch(e){case"wan.ouj.com":t="https://hm.baidu.com/hm.js?cb8a508fddadcf2bad29789b3f91e89c"}var n=document.createElement("script");n.src=t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a)}};c.init()}();
|