index.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <title>色域迷惑</title>
  7. <!-- Allow fullscreen mode on iOS devices. (These are Apple specific meta tags.) -->
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
  9. <meta name="apple-mobile-web-app-capable" content="yes" />
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  11. <link rel="apple-touch-icon" sizes="256x256" href="icon-256.png" />
  12. <meta name="HandheldFriendly" content="true" />
  13. <!-- Construct 2 exported games require jQuery. -->
  14. <script src="jquery-2.0.0.min.js"></script>
  15. <link rel="shortcut icon" href="icon.png">
  16. <!-- Chrome for Android web app tags -->
  17. <meta name="mobile-web-app-capable" content="yes" />
  18. <!-- All margins and padding must be zero for the canvas to fill the screen. -->
  19. <style type="text/css">
  20. * {
  21. padding: 0;
  22. margin: 0;
  23. }
  24. body {
  25. background: #000;
  26. color: #fff;
  27. overflow: hidden;
  28. -ms-touch-action: none;
  29. }
  30. canvas {
  31. touch-action-delay: none;
  32. touch-action: none;
  33. -ms-touch-action: none;
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <div id="fb-root"></div>
  39. <script>
  40. // Issue a warning if trying to preview an exported project on disk.
  41. (function(){
  42. // Check for running exported on file protocol
  43. if (window.location.protocol.substr(0, 4) === "file")
  44. {
  45. alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");
  46. }
  47. })();
  48. </script>
  49. <div id="c2canvasdiv">
  50. <canvas id="c2canvas" width="320" height="480">
  51. </canvas>
  52. </div>
  53. <div id="moregame" style="position:fixed;z-index:99; bottom:10px; left:0px; font-size:20px; width:100%; text-align:center;">
  54. <a href="javascript:void(0);" ontouchstart="document.getElementById('share').style.display='';">炫耀一下</a>
  55. <a href="javascript:void(0);" onClick="clickMore();">更多游戏</a>
  56. </div>
  57. <input id="bt-game-id" type="hidden" value="8-fitzcolor">
  58. <script src="c2runtime.js"></script>
  59. <script>
  60. // Size the canvas to fill the browser viewport.
  61. jQuery(window).resize(function() {
  62. cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
  63. });
  64. // Start the Construct 2 project running on window load.
  65. jQuery(document).ready(function ()
  66. {
  67. // Create new runtime using the c2canvas
  68. cr_createRuntime("c2canvas");
  69. });
  70. // Pause and resume on page becoming visible/invisible
  71. function onVisibilityChanged() {
  72. if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden)
  73. cr_setSuspended(true);
  74. else
  75. cr_setSuspended(false);
  76. };
  77. document.addEventListener("visibilitychange", onVisibilityChanged, false);
  78. document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);
  79. document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);
  80. document.addEventListener("msvisibilitychange", onVisibilityChanged, false);
  81. </script>
  82. <script language=javascript>
  83. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html';
  84. var thegameurl ="http://game.ikongzhong.cn/games/symh/";
  85. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  86. window.shareData = {
  87. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWH1yXgxEqLG0UslEPjMCgyia6paWSwETpX6DjC9Zap7iaztHeErqZhC2td5WrJXtw9TY9VEvKZ2mInQ/640",
  88. "timeLineLink": thegameurl,
  89. "tTitle": "色域迷惑",
  90. "tContent": "色域迷惑"
  91. };
  92. function goHome(){
  93. window.location=mebtnopenurl;
  94. }
  95. function clickMore(){
  96. if((window.location+"").indexOf("f=zf",1)>0){
  97. window.location = mebtnopenurl;
  98. }
  99. else{
  100. goHome();
  101. }
  102. }
  103. function dp_share(){
  104. document.getElementById("share").style.display="";
  105. }
  106. function dp_Ranking(){
  107. window.location=mebtnopenurl;
  108. }
  109. function showAd(){
  110. }
  111. function hideAd(){
  112. }
  113. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  114. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  115. WeixinJSBridge.invoke('sendAppMessage', {
  116. "img_url": window.shareData.imgUrl,
  117. "link": window.shareData.timeLineLink,
  118. "desc": window.shareData.tContent,
  119. "title": window.shareData.tTitle
  120. }, onShareComplete);
  121. });
  122. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  123. WeixinJSBridge.invoke('shareTimeline', {
  124. "img_url": window.shareData.imgUrl,
  125. "img_width": "640",
  126. "img_height": "640",
  127. "link": window.shareData.timeLineLink,
  128. "desc": window.shareData.tContent,
  129. "title": window.shareData.tTitle
  130. }, onShareComplete);
  131. });
  132. }, false);
  133. </script>
  134. <div id=share style="display: none">
  135. <img width="100%" src="share.png" style="position: fixed; z-index: 9999; top: 0; left: 0; "
  136. ontouchstart="document.getElementById('share').style.display='none';" />
  137. </div>
  138. <script type="text/javascript">
  139. var myData = { gameid: "symh" };
  140. // var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  141. window.shareData.timeLineLink = mebtnopenurl ;
  142. function dp_submitScore(score){
  143. myData.score = parseInt(score);
  144. myData.scoreName ="获得"+score+"分";
  145. document.title = window.shareData.tTitle = "我在【色域迷惑】中,我获得"+score+"分,你的反应有多快?快来测试一下就知道了!";
  146. }
  147. function onShareComplete(res) {
  148. if (localStorage.myuid && myData.score != undefined) {
  149. setTimeout(function(){
  150. if (confirm("?")) {
  151. window.location =mebtnopenurl ;
  152. }
  153. else {
  154. document.location.href = mebtnopenurl;
  155. }
  156. }, 500);
  157. }
  158. else {
  159. document.location.href = guanzhuurl;
  160. }
  161. }
  162. </script>
  163. <div style="display: none;">
  164. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script>
  165. </div>
  166. </body>
  167. </html>