index.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html manifest="offline.appcache">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <title>熊猫也疯狂</title>
  7. <!-- Standardised web app manifest -->
  8. <link rel="manifest" href="app.manifest" />
  9. <!-- Allow fullscreen mode on iOS devices. (These are Apple specific meta tags.) -->
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
  11. <meta name="apple-mobile-web-app-capable" content="yes" />
  12. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  13. <meta name="HandheldFriendly" content="true" />
  14. <!-- Chrome for Android web app tags -->
  15. <meta name="mobile-web-app-capable" content="yes" />
  16. <!-- All margins and padding must be zero for the canvas to fill the screen. -->
  17. <style type="text/css">
  18. * {
  19. padding: 0;
  20. margin: 0;
  21. }
  22. html, body {
  23. background: #000;
  24. color: #fff;
  25. overflow: hidden;
  26. touch-action: none;
  27. -ms-touch-action: none;
  28. }
  29. canvas {
  30. touch-action-delay: none;
  31. touch-action: none;
  32. -ms-touch-action: none;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <div id="fb-root"></div>
  38. <script>
  39. // Issue a warning if trying to preview an exported project on disk.
  40. (function(){
  41. // Check for running exported on file protocol
  42. if (window.location.protocol.substr(0, 4) === "file")
  43. {
  44. 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.)");
  45. }
  46. })();
  47. </script>
  48. <!-- The canvas must be inside a div called c2canvasdiv -->
  49. <div id="c2canvasdiv">
  50. <!-- The canvas the project will render to. If you change its ID, don't forget to change the
  51. ID the runtime looks for in the jQuery events above (ready() and cr_sizeCanvas()). -->
  52. <canvas id="c2canvas" width="480" height="854">
  53. <!-- This text is displayed if the visitor's browser does not support HTML5.
  54. You can change it, but it is a good idea to link to a description of a browser
  55. and provide some links to download some popular HTML5-compatible browsers. -->
  56. </canvas>
  57. </div>
  58. <!-- Pages load faster with scripts at the bottom -->
  59. <!-- Construct 2 exported games require jQuery. -->
  60. <script src="jquery-2.0.0.min.js"></script>
  61. <!-- The runtime script. You can rename it, but don't forget to rename the reference here as well.
  62. This file will have been minified and obfuscated if you enabled "Minify script" during export. -->
  63. <script src="c2runtime.js"></script>
  64. <script>
  65. // Size the canvas to fill the browser viewport.
  66. jQuery(window).resize(function() {
  67. cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
  68. });
  69. // Start the Construct 2 project running on window load.
  70. jQuery(document).ready(function ()
  71. {
  72. // Create new runtime using the c2canvas
  73. cr_createRuntime("c2canvas");
  74. });
  75. // Pause and resume on page becoming visible/invisible
  76. function onVisibilityChanged() {
  77. if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden)
  78. cr_setSuspended(true);
  79. else
  80. cr_setSuspended(false);
  81. };
  82. document.addEventListener("visibilitychange", onVisibilityChanged, false);
  83. document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);
  84. document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);
  85. document.addEventListener("msvisibilitychange", onVisibilityChanged, false);
  86. </script>
  87. </body>
  88. </html>