index.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html lang="en" manifest="manifest.mf"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  3. <title>兔子快跑-空中传媒</title>
  4. <meta charset="utf-8">
  5. <meta name="apple-mobile-web-app-capable" content="yes">
  6. <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0, minimal-ui">
  7. <style>
  8. body {
  9. margin: 0px;
  10. padding: 0px;
  11. width: 100%;
  12. background-color:black;
  13. }
  14. canvas {
  15. image-rendering: -o-crisp-edges;
  16. image-rendering: optimize-contrast;
  17. -ms-interpolation-mode: nearest-neighbor;
  18. -webkit-tap-highlight-color: rgba(0,0,0,0);
  19. -moz-tap-highlight-color: rgba(0,0,0,0);
  20. tap-highlight-color: rgba(0,0,0,0);
  21. user-select: none;
  22. -webkit-touch-callout: none;
  23. -webkit-user-select: none;
  24. -moz-user-select: none;
  25. -ms-user-select: none;
  26. }
  27. </style>
  28. <!--<script type="text/javascript">document.write('<script type="text/javascript" src="../resource/js/resource_loader.js?ver='+Math.random()+'"><\/script>')</script>-->
  29. <script src="./index_files/viewporter.js"></script>
  30. </head>
  31. <body ryt12819="1">
  32. <div id="viewporter" style="margin-top: 0px; margin-left: 57.75px;">
  33. <canvas id="canvas" moz-opaque="" width="480" height="320" style="width: 1282.5px; height: 855px;"></canvas>
  34. </div>
  35. <script src="index_files/TweenMax.min.js"></script>
  36. <script src="index_files/howler.js"></script>
  37. <script src="index_files/seedrandom.js"></script>
  38. <script type="text/javascript" src="./index_files/game.js"></script>
  39. <script src="index_files/app.js"></script>
  40. <script type="text/javascript">
  41. var mebtnopenurl = "http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  42. var tit = "";
  43. var DFW = {
  44. appId: "",
  45. TLImg: "http://game.ikongzhong.cn/icon/tuzi.png",
  46. url: "http://game.ikongzhong.cn/games/tuzi",
  47. title: "兔子快跑",
  48. desc: "比一比看谁跑的最远!"
  49. };
  50. var onBridgeReady = function () {
  51. WeixinJSBridge.on('menu:share:appmessage', function (argv) {
  52. WeixinJSBridge.invoke('sendAppMessage', {
  53. "appid": DFW.appId,
  54. "img_url": DFW.TLImg,
  55. "img_width": "120",
  56. "img_height": "120",
  57. "link": DFW.url,
  58. "title": DFW.title + tit,
  59. "desc": DFW.desc
  60. }, function (res) {
  61. document.location.href = mebtnopenurl;
  62. }
  63. );
  64. });
  65. WeixinJSBridge.on('menu:share:timeline', function (argv) {
  66. WeixinJSBridge.invoke('shareTimeline', {
  67. "appid": DFW.appId,
  68. "img_url": DFW.TLImg,
  69. "img_width": "120",
  70. "img_height": "120",
  71. "link": DFW.url,
  72. "title": DFW.title + tit,
  73. "desc": DFW.desc
  74. }, function (res) {
  75. document.location.href = mebtnopenurl;
  76. }
  77. );
  78. });
  79. };
  80. if (document.addEventListener) {
  81. document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
  82. } else if (document.attachEvent) {
  83. document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
  84. document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
  85. }
  86. function dp_submitScore(level,score)
  87. {
  88. //alert("你获得了 " + score + " 分");
  89. if (score > 0) {
  90. if (confirm("你获得了" + score + " 要不要通知下小伙伴们呢?")) {
  91. do_share(score);
  92. }
  93. }
  94. }
  95. function do_share(score) {
  96. document.title = "我获得了" + score + "你行吗?也来试试吧!";
  97. document.getElementById("share").style.display = "";
  98. window.DFW.title = document.title;
  99. }
  100. </script>
  101. <div id="share" style="display: none">
  102. <img width="100%" src="images/share.png" style="position: fixed; z-index: 9999; top: 0; left: 0; display: " ontouchstart="document.getElementById(&#39;share&#39;).style.display=&#39;none&#39;;">
  103. </div>
  104. <div style="display: none;"><script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script></div>
  105. </body></html>