index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>疯狂手指 - 根本不能停下来</title>
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
  8. <meta name="apple-mobile-web-app-capable" content="yes"/>
  9. <meta name="full-screen" content="true"/>
  10. <meta name="screen-orientation" content="portrait"/>
  11. <meta name="x5-fullscreen" content="true"/>
  12. <meta name="360-fullscreen" content="true"/>
  13. <style>
  14. body {
  15. text-align: center;
  16. background: #000000;
  17. padding: 0;
  18. border: 0;
  19. margin: 0;
  20. height: 100%;
  21. }
  22. * {
  23. -webkit-touch-callout:none;
  24. -webkit-user-select:none;
  25. -khtml-user-select:none;
  26. -moz-user-select:none;
  27. -ms-user-select:none;
  28. user-select:none;
  29. -webkit-tap-highlight-color:rgba(0,0,0,0);
  30. }
  31. html {
  32. -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
  33. }
  34. .button {
  35. display: inline-block;
  36. zoom: 1;
  37. vertical-align: baseline;
  38. margin: 0 2px;
  39. outline: none;
  40. cursor: pointer;
  41. text-align: center;
  42. text-decoration: none;
  43. font: 14px/100% Arial, Helvetica, sans-serif;
  44. padding: .5em 2em .55em;
  45. text-shadow: 0 1px 1px rgba(0,0,0,.3);
  46. -webkit-border-radius: .5em;
  47. -moz-border-radius: .5em;
  48. border-radius: .5em;
  49. -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
  50. -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
  51. box-shadow: 0 1px 2px rgba(0,0,0,.2);
  52. }
  53. .red {
  54. color: #faddde;
  55. border: solid 1px #980c10;
  56. background: #d81b21;
  57. background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
  58. background: -moz-linear-gradient(top, #ed1c24, #aa1317);
  59. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
  60. }
  61. .active {
  62. background: #d81b01;
  63. }
  64. </style>
  65. </head>
  66. <body>
  67. <div style="display:inline-block;width:100%; height:100%;margin: 0 auto; background: black; position:relative;" id="gameDiv">
  68. <div style="text-align:center;margin:50px;">
  69. <span id="timer" style="color:#fff;font-size:20px;">10 秒</span>
  70. </div>
  71. <button id="button" class="button red" style="margin-top: 30px;width: 160px;height:160px;border-radius:80px;font-size:18px;font-weight:bold;">点我点我</button>
  72. <div style="margin:20px;text-align:center;">
  73. <div id="result" style="color:#fff;font-size:30px;">0 次</div>
  74. <div id="best" style="margin-top:20px;color:#fff;font-size:20px;"> </div>
  75. </div>
  76. </div>
  77. <div id="sbg" class="sbg">
  78. <div class="arron"></div>
  79. <p id="msg">请点击右上角<br />点击【分享到朋友圈】<br />测测好友的反应能力吧!</p>
  80. </div>
  81. <div class="ads" style="width: 100%; height: 69px; margin: 0px; margin-top: -60px; padding: 0px; border: none; background: none; "-->
  82. <a align="center" style="color:white" href="http://game.ikongzhong.cn/index.html">更多游戏</a>
  83. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  84. <a align="center" style="color:white" href="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd">关注我们</a>
  85. </div>
  86. <script language=javascript>
  87. var helptime=0;
  88. function help(){
  89. }
  90. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html';
  91. var myscore=0;
  92. window.shareData = {
  93. "imgUrl": "./icon.png",
  94. "timeLineLink": "./shouzhi/",
  95. "tTitle": "疯狂手指-根本停不下来,玩过之后我的手指已经不是我的了!",
  96. "tContent": "在10秒内疯狂的点按钮,想赢?不容易。"
  97. };
  98. function goHome(){
  99. window.location="http://www.xjwdm.com/";
  100. }
  101. function dp_share(score){
  102. if(score>0){
  103. document.title = "10秒我能点"+score+"下!你行?你试试"
  104. }
  105. else{
  106. document.title = "疯狂手指-根本停不下来,玩过之后我的手指已经不是我的了!"
  107. }
  108. document.getElementById("share").style.display="";
  109. window.shareData.tTitle = document.title;
  110. }
  111. function dp_Ranking(){
  112. window.location="http://game.ikongzhong.cn/";
  113. }
  114. function showAd(){
  115. }
  116. function hideAd(){
  117. }
  118. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  119. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  120. WeixinJSBridge.invoke('sendAppMessage', {
  121. "img_url": window.shareData.imgUrl,
  122. "link": window.shareData.timeLineLink,
  123. "desc": window.shareData.tContent,
  124. "title": window.shareData.tTitle
  125. }, onShareComplete);
  126. });
  127. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  128. WeixinJSBridge.invoke('shareTimeline', {
  129. "img_url": window.shareData.imgUrl,
  130. "img_width": "640",
  131. "img_height": "640",
  132. "link": window.shareData.timeLineLink,
  133. "desc": window.shareData.tContent,
  134. "title": window.shareData.tTitle
  135. }, onShareComplete);
  136. });
  137. }, false);
  138. </script>
  139. <div id=share style="display: none">
  140. <img width=100% src="share.png" style="position: fixed;z-index:9999; top: 0; left: 0; display: " ontouchstart="document.getElementById('share').style.display='none';">
  141. </div>
  142. <div id="result_panel" style="display:none;text-align:center;padding-top:50px;position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,0.5)">
  143. <div><button id="reset" style="font-size:25px">再玩一次</button><br><button id="doShare" style="font-size:25px">炫耀一下</button></div>
  144. </div>
  145. <script src="jquery.min.js"></script>
  146. <div style="display: none;">
  147. <script type="text/javascript">
  148. function dp_submitScore(score){
  149. dp_share(score);
  150. /*
  151. if(score<40){
  152. if (confirm("")){
  153. myCRdata.score = score;
  154. myCRdata.scoreName = score+"步";
  155. dp_share(score);
  156. }
  157. }
  158. */
  159. }
  160. function onShareComplete(res) {
  161. document.location.href = mebtnopenurl;
  162. }
  163. </script>
  164. <script type="text/javascript">
  165. var initial = 1000;
  166. var count = initial;
  167. var counter; //10 will run it every 100th of a second
  168. var state = 0;
  169. var total = 0;
  170. if (localStorage.max) {
  171. $('#best').html( '最好成绩:' + localStorage.max + ' 次');
  172. }
  173. function timer() {
  174. if (count <= 0) {
  175. clearInterval(counter);
  176. state = 0;
  177. $('#result_panel').show();
  178. if ( !localStorage.max || parseInt(localStorage.max) < total) {
  179. localStorage.max = total;
  180. $('#best').html( '最好成绩:' + localStorage.max + ' 次');
  181. }
  182. localStorage.max = parseInt(localStorage.max) > total ? localStorage.max: total;
  183. return;
  184. }
  185. count--;
  186. displayCount(count);
  187. }
  188. function displayCount(count) {
  189. var res = count / 100;
  190. document.getElementById("timer").innerHTML = res.toPrecision(count.toString().length) + " 秒";
  191. }
  192. $(document).on('touchmove', function(e) {
  193. e.preventDefault();
  194. })
  195. $('#button').on('touchstart', function () {
  196. if (!state) {
  197. state = 1;
  198. counter = setInterval(timer, 10);
  199. }
  200. this.classList.add('active');
  201. });
  202. $('#button').on('touchend', function () {
  203. if (state) {
  204. total++;
  205. $('#result').html(total + ' 次');
  206. }
  207. this.classList.remove('active');
  208. });
  209. // $('#stop').on('click', function () {
  210. // clearInterval(counter);
  211. // });
  212. function reset() {
  213. count = initial;
  214. total = 0;
  215. state = 0;
  216. $('#result').html(total + ' 次');
  217. $('#timer').html(10 + ' 秒');
  218. }
  219. $('#reset').on('touchend', function () {
  220. reset();
  221. $('#result_panel').hide();
  222. });
  223. $('#doShare').on('touchend', function () {
  224. dp_share(total);
  225. $('#result_panel').hide();
  226. reset();
  227. });
  228. displayCount(initial);
  229. </script>
  230. <scritp>
  231. <!-- document.getElementById("ads").style.display='inline-block'; -->
  232. </script>
  233. <div style="display:none">
  234. </div>
  235. </body>
  236. </html>