Stupid Autoplay Policy...

This commit is contained in:
jscraft 2022-03-01 02:46:21 +00:00
parent d624094a8e
commit b8c7acea9e

View file

@ -1,74 +1,83 @@
<title>Click to Start!</title>
<center><h1>SM<wbr>6<wbr>4-J<wbr>S - Su<wbr>p<wbr>er Ma<wbr>ri<wbr>o 6<wbr>4 made entirely out of J<wbr>av<wbr>aSc<wbr>rip<wbr>t and W<wbr>ebA<wbr>ss<wbr>e<wbr>mbl<wbr>y!</h1><h3>Mad<wbr>e by T<wbr>W<wbr>TG.</h3><hr></hr><p>Due to C<wbr>hr<wbr>om<wbr>e's S<wbr>t<wbr>u<wbr>p<wbr>i<wbr>d A<wbr>ud<wbr>io<wbr>/V<wbr>i<wbr>d<wbr>e<wbr>o A<wbr>ut<wbr>op<wbr>l<wbr>ay<wbr> P<wbr>ol<wbr>ic<wbr>y,<wbr> Cli<wbr>ck<wbr> t<wbr>he <wbr>pa<wbr>ge <wbr>to <wbr>st<wbr>art <wbr>th<wbr>e <wbr>g<wbr>a<wbr>me.</p></center>
<script>
document.addEventListener('click', () => {
<!--
<html lang="en-us"><head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Super Mario 64</title>
<style>
body, html{
margin: 0;
padding: 0;
width: 100vw;
min-height: 100vh;
font-family: Arial, Helvetica, sans-serif;
color: white;
image-rendering: pixelated;
scrollbar-width: none;
}
::-webkit-scrollbar {
display: none;
}
#container {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
canvas {
width: 100vw;
height: 100vh;
}
</style>
</head>
<body>
<div id="container">
<canvas class="emscripten" id="canvas" width="1920" height="1080" style="cursor: default;"></canvas>
</div>
<script type="text/javascript">
var Module = {
preRun: [],
postRun: [],
print: (function() {
return function(text) {
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
console.log(text);
};
})(),
printErr: function(text) {
if (arguments.length > 1)
text = Array.prototype.slice.call(arguments).join(' ');
console.error(text);
},
canvas: (function() {
var canvas = document.getElementById('canvas');
canvas.width = window.innerWidth; // Todo: how to do this from c++
canvas.height = window.innerHeight;
canvas.addEventListener("webglcontextlost", function(e) {
alert('WebGL context lost. You will need to reload the page.');
e.preventDefault();
}, false);
return canvas;
})(),
setStatus: function(text) {
}
};
</script>
<script async="" type="text/javascript" src="sm64.js"></script>
<script>
</script>
document.write( '<html lang=\"en-us\"><head>\n' );
document.write( ' <meta charset=\"utf-8\">\n' );
document.write( ' <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n' );
document.write( ' <title>Super Mario 64</title>\n' );
document.write( ' <style>\n' );
document.write( ' body, html{\n' );
document.write( ' margin: 0;\n' );
document.write( ' padding: 0;\n' );
document.write( ' width: 100vw;\n' );
document.write( ' min-height: 100vh;\n' );
document.write( ' font-family: Arial, Helvetica, sans-serif;\n' );
document.write( ' color: white;\n' );
document.write( ' image-rendering: pixelated;\n' );
document.write( ' scrollbar-width: none;\n' );
document.write( ' }\n' );
document.write( ' ::-webkit-scrollbar {\n' );
document.write( ' display: none;\n' );
document.write( ' }\n' );
document.write( ' #container {\n' );
document.write( ' width: 100vw;\n' );
document.write( ' height: 100vh;\n' );
document.write( ' display: flex;\n' );
document.write( ' align-items: center;\n' );
document.write( ' justify-content: center;\n' );
document.write( ' }\n' );
document.write( ' canvas {\n' );
document.write( ' width: 100vw;\n' );
document.write( ' height: 100vh;\n' );
document.write( ' }\n' );
document.write( ' </style>\n' );
document.write( ' </head>\n' );
document.write( ' <body>\n' );
document.write( ' <div id=\"container\">\n' );
document.write( ' <canvas class=\"emscripten\" id=\"canvas\" width=\"1920\" height=\"1080\" style=\"cursor: default;\"></canvas>\n' );
document.write( ' </div>\n' );
document.write( ' <script type=\"text/javascript\">\n' );
document.write( ' var Module = {\n' );
document.write( ' preRun: [],\n' );
document.write( ' postRun: [],\n' );
document.write( ' print: (function() {\n' );
document.write( ' return function(text) {\n' );
document.write( ' if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(\' \');\n' );
document.write( ' console.log(text);\n' );
document.write( ' };\n' );
document.write( ' })(),\n' );
document.write( ' printErr: function(text) {\n' );
document.write( ' if (arguments.length > 1)\n' );
document.write( ' text = Array.prototype.slice.call(arguments).join(\' \');\n' );
document.write( ' console.error(text);\n' );
document.write( ' },\n' );
document.write( ' canvas: (function() {\n' );
document.write( ' var canvas = document.getElementById(\'canvas\');\n' );
document.write( ' canvas.width = window.innerWidth; // Todo: how to do this from c++\n' );
document.write( ' canvas.height = window.innerHeight;\n' );
document.write( ' canvas.addEventListener(\"webglcontextlost\", function(e) {\n' );
document.write( ' alert(\'WebGL context lost. You will need to reload the page.\');\n' );
document.write( ' e.preventDefault();\n' );
document.write( ' }, false);\n' );
document.write( ' return canvas;\n' );
document.write( ' })(),\n' );
document.write( ' setStatus: function(text) {\n' );
document.write( ' }\n' );
document.write( ' };\n' );
document.write( ' </script>\n' );
document.write( ' <script async=\"\" type=\"text/javascript\" src=\"sm64.js\"></script>\n' );
document.write( ' <script>\n' );
document.write( ' </script>\n' );
document.write( ' \n' );
document.write( '\n' );
document.write( '\n' );
document.write( '\n' );
document.write( '\n' );
document.write( '</body></html>' );
</body></html>
//-->
})
</script>