app.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html {{ HTML_ATTRS }}>
  3. <head {{ HEAD_ATTRS }}>
  4. {{ HEAD }}
  5. </head>
  6. <body {{ BODY_ATTRS }}>
  7. {{ APP }}
  8. </body>
  9. <script>
  10. var _hmt = _hmt || [];
  11. (function () {
  12. var markIsApp = document.getElementById("markIsAppWebview")
  13. var isApp = Boolean(markIsApp && markIsApp.dataset && markIsApp.dataset.app)
  14. var host = window.location.host;
  15. if (!isApp && host.indexOf("jishuin") === -1) {
  16. var hm = document.createElement('script');
  17. hm.src = '//hm.baidu.com/hm.js?c92adf6182a39eb23c24cf43abc3f439';
  18. var s = document.getElementsByTagName('script')[ 0 ];
  19. s.parentNode.insertBefore(hm, s);
  20. console.log('百度统计应用到页面当中了');
  21. var bp = document.createElement('script');
  22. var curProtocol = window.location.protocol.split(':')[ 0 ];
  23. if (curProtocol === 'https') {
  24. bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
  25. } else {
  26. bp.src = 'http://push.zhanzhang.baidu.com/push.js';
  27. }
  28. var s = document.getElementsByTagName("script")[ 0 ];
  29. s.parentNode.insertBefore(bp, s);
  30. console.log('百度SEO push统计应用到页面当中了');
  31. }
  32. })();
  33. </script>
  34. <script>
  35. (function () {
  36. })();
  37. </script>
  38. </html>