stat.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. window.addEventListener("load", function() {
  2. setTimeout(function() {
  3. window.scrollTo(0, 1)
  4. }, 0)
  5. });
  6. function qike_h5_v1_refer() {
  7. if (navigator.userAgent.indexOf("qikegameplayer") != -1) {
  8. qike_h5_v1_show = false;
  9. return false
  10. }
  11. if (qike_h5_v1_checkmobile() != "android" && qike_h5_v1_checkmobile() != "iphone" && qike_h5_v1_checkmobile() != "ipad") {
  12. qike_h5_v1_show = false;
  13. return false
  14. }
  15. var refer = document.referrer;
  16. if (refer == "") {
  17. return false
  18. }
  19. };
  20. function qike_h5_v1_checkmobile() {
  21. var ua = navigator.userAgent;
  22. ua = ua ? ua.toLowerCase().replace(/-/g, "") : "";
  23. if (ua.match(/(Android)/i)) {
  24. return "android"
  25. }
  26. if (ua.match(/(iPhone|iPod)/i)) {
  27. return "iphone"
  28. }
  29. if (ua.match(/(iPad)/i)) {
  30. return "ipad"
  31. }
  32. if (ua.match(/(U;)/i)) {
  33. if (ua.match(/(Adr)/i)) {
  34. return "android"
  35. }
  36. }
  37. if (ua.match(/(U;)/i)) {
  38. if (ua.match(/(iPh)/i)) {
  39. return "iphone"
  40. }
  41. }
  42. if (ua.match(/(U;)/i)) {
  43. if (ua.match(/(iPd)/i)) {
  44. return "ipad"
  45. }
  46. }
  47. };
  48. function qike_h5_v1_init() {
  49. if (qike_h5_v1_show == false) {
  50. return false
  51. }
  52. var _0 = [];
  53. _0.push('<div id="J-qike-h5-v1-logo"><img src="' + qike_h5_v1_logo + '" height="80"/></div>');
  54. _0.push('<div id="J-qike-h5-v1-progress">...游戏马上开始...</div>');
  55. _0.push('<div id="J-qike-h5-v1-adbox">');
  56. _0.push('<a id="J-qike-h5-v1-close">×</a>');
  57. _0.push('<div id="J-qike-h5-v1-addefault" style="display:none;"></div>');
  58. _0.push('<div id="J-qike-h5-v1-ad">');
  59. _0.push('<iframe id="ad_1" src="about:blank" width="320" height="320" allowtransparency="true" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" style="border:0px;"></iframe>');
  60. _0.push('</div>');
  61. _0.push('</div>');
  62. var _1 = document.createElement("div");
  63. _1.id = "J-qike-h5-v1-mask";
  64. _1.style = "display:none;";
  65. document.body.appendChild(_1);
  66. var _1 = document.createElement("div");
  67. _1.id = "J-qike-h5-v1-load";
  68. _1.style = "display:none;";
  69. document.body.appendChild(_1);
  70. _1.innerHTML = _0.join("");
  71. var iframe = document.getElementById("ad_1");
  72. var doc = iframe.contentWindow.document;
  73. var ad = qike_h5_v1_ad;
  74. var html = ad.content;
  75. if (!/<body>/.test(html)) {
  76. html = '<!DOCTYPE html><body>' + html + '</body>'
  77. }
  78. doc.open();
  79. doc.write(html);
  80. doc.close()
  81. };
  82. function qike_h5_v1_ui() {
  83. if (qike_h5_v1_show == false) {
  84. return false
  85. }
  86. var _3 = 0,
  87. _4 = 0,
  88. _2 = 1;
  89. if (window.innerWidth) {
  90. _3 = window.innerWidth
  91. } else if ((document.body) && (document.body.clientWidth)) {
  92. _3 = document.body.clientWidth
  93. }
  94. if (document.documentElement && document.documentElement.clientWidth) {
  95. _3 = document.documentElement.clientWidth
  96. }
  97. if (window.innerHeight) {
  98. _4 = window.innerHeight
  99. } else if ((document.body) && (document.body.clientHeight)) {
  100. _4 = document.body.clientHeight
  101. }
  102. if (document.documentElement && document.documentElement.clientHeight) {
  103. _4 = document.documentElement.clientHeight
  104. }
  105. if (_3 <= _4) {
  106. _2 = (_3 / 350)
  107. } else {
  108. _2 = (_4 / 461)
  109. }
  110. var _6 = document.getElementById("J-qike-h5-v1-mask");
  111. _6.style.cssText = "z-index:90000002;position:fixed;width:100%;height:100%;top:0;left:0;background: #01a8fe;background: -moz-linear-gradient(top,#46afff 0%,#ffffff 100%);background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#46afff),color-stop(100%,#ffffff));background: -webkit-linear-gradient(top,#46afff 0%,#ffffff 100%);background: -o-linear-gradient(top,#46afff 0%,#ffffff 100%);background: -ms-linear-gradient(top,#46afff 0%,#ffffff 100%);background: linear-gradient(to bottom,#46afff 0%,#ffffff 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#46afff',endColorstr='#ffffff',GradientType=0 );";
  112. var _7 = document.getElementById("J-qike-h5-v1-load");
  113. _7.style.cssText = "transform:scale(" + _2 + ");-webkit-transform:scale(" + _2 + ");-o-transform:scale(" + _2 + ");-moz-transform:scale(" + _2 + ");z-index:90000003;position:fixed;width:350px;top:50%;left:50%;margin-left:-175px;margin-top:-256px;text-align:center;color:#000;font-family: 'Microsoft Yahei', Arial, 'Helvetica Neue', sans-serif;-webkit-font-smoothing: antialiased;font-size:16px;";
  114. var _13 = document.getElementById("J-qike-h5-v1-logo");
  115. _13.style.cssText = "position:relative;width:100%;text-align:center;margin:40px auto 0;";
  116. var _14 = document.getElementById("J-qike-h5-v1-progress");
  117. _14.style.cssText = "position:relative;width:100%;text-align:center;line-height:30px;";
  118. var _12 = document.getElementById("J-qike-h5-v1-adbox");
  119. _12.style.cssText = "position:relative;width:320px;height:320px;text-align:center;border:#fff solid 10px;border-radius:5px;background:#fff;margin:20px auto 0;";
  120. var _9 = document.getElementById("J-qike-h5-v1-addefault");
  121. _9.style.cssText = "position:absolute;width:320px;height:320px;z-index:1;";
  122. _9.innerHTML = '';
  123. var _10 = document.getElementById("J-qike-h5-v1-ad");
  124. _10.style.cssText = "position:absolute;width:320px;height:320px;z-index:90000004;overflow:hidden;";
  125. var _8 = document.getElementById("J-qike-h5-v1-close");
  126. _8.onclick = qike_h5_v1_close;
  127. _8.style.cssText = "position:absolute;display:block;width:28px;height:28px;line-height:28px;text-align:center;background:#007cff;color:#fff;border:#fff solid 1px;border-radius:15px;top:-30px;left:50%;margin-left:-15px;font-weight:bold;cursor:pointer;"
  128. };
  129. function qike_h5_v1_close() {
  130. var _6 = document.getElementById("J-qike-h5-v1-mask");
  131. _6.style.cssText = "";
  132. _6.style.display = "none";
  133. _6.innerHTML = "";
  134. var _7 = document.getElementById("J-qike-h5-v1-load");
  135. _7.style.cssText = "";
  136. _7.style.display = "none";
  137. _7.innerHTML = "";
  138. clearTimeout(qike_h5_v1_nid);
  139. qike_h5_v1_show = false
  140. };
  141. function qike_h5_v1_progress() {
  142. if (qike_h5_v1_show == false) {
  143. clearTimeout(qike_h5_v1_nid);
  144. return false
  145. }
  146. if (qike_h5_v1_time >= qike_h5_v1_totaltime) {
  147. qike_h5_v1_close()
  148. } else {
  149. var _5 = qike_h5_v1_totaltime - qike_h5_v1_time;
  150. _5 = Math.ceil(_5 / 1000);
  151. if (_5 <= 0) {
  152. _5 = 1
  153. }
  154. document.getElementById("J-qike-h5-v1-progress").innerHTML = '...游戏 <span style="color:#f00">' + _5 + '</span> 秒后开始...';
  155. qike_h5_v1_nid = setTimeout('qike_h5_v1_progress()', 500)
  156. }
  157. qike_h5_v1_time = qike_h5_v1_time + 500
  158. };
  159. var qike_h5_v1_logo = "../ad/logo.png";
  160. var qike_h5_v1_ad = {
  161. "content": "<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><!-- yx8.zsy --><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-3253453814032357\" data-ad-slot=\"4119231824\" data-ad-format=\"auto\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script>"
  162. };
  163. var qike_h5_v1_totaltime = 5000;
  164. var qike_h5_v1_time = 0;
  165. var qike_h5_v1_show = true;
  166. qike_h5_v1_refer();
  167. qike_h5_v1_init();
  168. qike_h5_v1_ui();
  169. var qike_h5_v1_nid = setTimeout('qike_h5_v1_progress()', 500);
  170. window.onresize = function() {
  171. qike_h5_v1_ui()
  172. };
  173. var _11 = (("https:" == document.location.protocol) ? " https://" : " http://");
  174. document.write(unescape("%3Cscript src='" + _11 + "hm.baidu.com/h.js%3F6d12cedf01c3bcf11e0b3f4dfd963df3' type='text/javascript'%3E%3C/script%3E"))