Skip to content

Instantly share code, notes, and snippets.

@ojdon
Created September 1, 2015 15:15
Show Gist options
  • Save ojdon/5d6c4d424926c37d946e to your computer and use it in GitHub Desktop.
Save ojdon/5d6c4d424926c37d946e to your computer and use it in GitHub Desktop.
Experimental HTML file for testing New Nintendo 3DS browser
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="HandheldFriendly" content="true" />
<title>New 3DS Demo</title>
<style>
body {
display: block;
padding: 0;
margin: 0 auto;
overflow: hidden;
-ms-touch-action: none;
position: fixed;
}
canvas.game, footer {
display: block;
width: 100vw;
height: 100vh;
-ms-touch-action: none;
}
canvas.game {
background: #F00;
}
footer {
background: #00F;
}
</style>
</head>
<body>
<canvas class="game"></canvas>
<footer></footer>
<script>
document.onkeydown = function (e) {return false;}
window.onscroll = function(e){e.preventDefault()};
document.getElementsByTagName('head')[0].appendChild(viewport);
if(window.addEventListener){ //Firefox only
window.addEventListener("DOMMouseScroll", function(e){e.preventDefault()}, true);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment