index.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>气球砰砰砰</title>
  5. <meta charset="utf-8">
  6. <meta name="apple-mobile-web-app-capable" content="yes" />
  7. <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no,width=device-width,minimal-ui" />
  8. <link rel="shortcut icon" href="icon.png">
  9. <link rel="icon" href="icon.png">
  10. <style>
  11. body {
  12. margin: 0px;
  13. padding: 0px;
  14. width: 100%;
  15. background-color:black;
  16. }
  17. canvas {
  18. image-rendering: -o-crisp-edges;
  19. image-rendering: optimize-contrast;
  20. -ms-interpolation-mode: nearest-neighbor;
  21. -webkit-tap-highlight-color: rgba(0,0,0,0);
  22. -moz-tap-highlight-color: rgba(0,0,0,0);
  23. tap-highlight-color: rgba(0,0,0,0);
  24. user-select: none;
  25. -webkit-touch-callout: none;
  26. -webkit-user-select: none;
  27. -moz-user-select: none;
  28. -ms-user-select: none;
  29. }
  30. </style>
  31. <script src="js/viewporter.js"></script>
  32. <script>
  33. // Kaisergames API development prototype
  34. // make sure this code is executed before the game calls any kaisergames.* methods!
  35. if (typeof window !== "undefined" && !window.kaisergames){
  36. window.kaisergames = new function(){
  37. return {
  38. /**
  39. * @param level string[optional]
  40. * @param score number[optional]
  41. */
  42. gameOver: function(level, score) {
  43. if (!level) level = "-";
  44. },
  45. /**
  46. * @param level string[optional]
  47. * @param score number[optional]
  48. */
  49. levelUp: function(level, score) {
  50. if (!level) level = "-";
  51. },
  52. /**
  53. * @param level string
  54. * @param score number
  55. */
  56. submitHighscore: function(level, score) {
  57. if (!level) level = "-";
  58. }
  59. }
  60. }
  61. }
  62. </script>
  63. </head>
  64. <body>
  65. <div id="viewporter">
  66. <canvas id="canvas" moz-opaque></canvas>
  67. </div>
  68. <input id="bt-game-id" type="hidden" value="8-ball">
  69. <div id="moregame" style="position:fixed;z-index:99; bottom:20px; left:0px; font-size:20px; width:100%; text-align:center;">
  70. <a href="javascript:void(0);" onClick="dp_share();">炫耀一下</a>
  71. <a href="javascript:void(0);" onClick="clickMore();">更多游戏</a>
  72. </div>
  73. </body>
  74. <script src="js/TweenMax.min.js"></script>
  75. <script src="js/howler.js"></script>
  76. <script src="js/app.min.js"></script>
  77. <script language=javascript>
  78. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html';
  79. var thegameurl ="http://game.ikongzhong.cn/games/qqppp/";
  80. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  81. window.shareData = {
  82. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWH1yXgxEqLG0UslEPjMCgyiaPwtk7cgdzTZGz2hylQv3Jz3yAEtXDyVh5NOdYJaF6M8kU86RlpFAmQ/640",
  83. "timeLineLink": thegameurl,
  84. "tTitle": "气球砰砰砰",
  85. "tContent": "气球砰砰砰"
  86. };
  87. function goHome(){
  88. window.location=mebtnopenurl;
  89. }
  90. function clickMore(){
  91. if((window.location+"").indexOf("f=zf",1)>0){
  92. window.location =mebtnopenurl;
  93. }
  94. else{
  95. goHome();
  96. }
  97. }
  98. function dp_share(){
  99. document.getElementById("share").style.display="";
  100. }
  101. function dp_Ranking(){
  102. window.location=mebtnopenurl;
  103. }
  104. function showAd(){
  105. }
  106. function hideAd(){
  107. }
  108. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  109. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  110. WeixinJSBridge.invoke('sendAppMessage', {
  111. "img_url": window.shareData.imgUrl,
  112. "link": window.shareData.timeLineLink,
  113. "desc": window.shareData.tContent,
  114. "title": window.shareData.tTitle
  115. }, onShareComplete);
  116. });
  117. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  118. WeixinJSBridge.invoke('shareTimeline', {
  119. "img_url": window.shareData.imgUrl,
  120. "img_width": "640",
  121. "img_height": "640",
  122. "link": window.shareData.timeLineLink,
  123. "desc": window.shareData.tContent,
  124. "title": window.shareData.tTitle
  125. }, onShareComplete);
  126. });
  127. }, false);
  128. </script>
  129. <div id=share style="display: none">
  130. <img width="100%" src="share.png"
  131. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  132. ontouchstart="document.getElementById('share').style.display='none';" />
  133. </div>
  134. <script type="text/javascript">
  135. var myData = { gameid: "qqppp" };
  136. // var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  137. window.shareData.timeLineLink = mebtnopenurl;
  138. function dp_submitScore(score){
  139. myData.score = parseInt(score);
  140. myData.scoreName ="获得"+score+"分";
  141. document.title = window.shareData.tTitle = "我玩《气球砰砰砰》得了"+score+"分,气球爱消除,快来一起玩吧!";
  142. }
  143. function onShareComplete(res) {
  144. if (localStorage.myuid && myData.score != undefined) {
  145. setTimeout(function(){
  146. if (confirm("?")) {
  147. window.location =mebtnopenurl;
  148. }
  149. else {
  150. document.location.href = mebtnopenurl;
  151. }
  152. }, 500);
  153. }
  154. else {
  155. document.location.href = guanzhuurl ;
  156. }
  157. }
  158. </script>
  159. <div style="display: none;">
  160. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script>
  161. </div>
  162. </html>