main.js 724 B

12345678910111213141516171819202122
  1. var config={};config.host="http://v2.xinnongbaohe.com/web/application/front/?";config.type="";config.current="http://www.xinnongbaohe.com/";config.upload="http://image.xinnongbaohe.com/upload";config.assets="http://www.xinnongbaohe.com/assets/lib/";
  2. var REG_BODY = /<body[^>]*>([\s\S]*)<\/body>/;
  3. function getBody(content){
  4. var result = REG_BODY.exec(content);
  5. if(result && result.length === 2)
  6. return result[1];
  7. return content;
  8. }
  9. var winSize = function() {
  10. var e = window,
  11. a = 'inner';
  12. if (!('innerWidth' in window )){
  13. a = 'client';
  14. e = document.documentElement || document.body;
  15. }
  16. return { width : e[ a+'Width' ] , height : e[ a+'Height' ] };
  17. };