Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c42f3cefc5
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (52 sloc) 1.615 kb
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Pacman</title>
<style type="text/css">
@font-face {
font-family: 'BDCartoonShoutRegular';
src: url('BD_Cartoon_Shout-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
#pacman {
height:450px;
width:342px;
margin:20px auto;
}
#shim {
font-family: BDCartoonShoutRegular;
position:absolute;
visibility:hidden
}
h1 { font-family: BDCartoonShoutRegular; text-align:center; }
body { width:342px; margin:0px auto; font-family:sans-serif; }
a { text-decoration:none; }
</style>
</head>
<body>
<div id="shim">shim for font face</div>
<h1>HTML5 Pacman</h1>
<a href="http://arandomurl.com/">Writeup</a> |
Code on <a href="http://arandomurl.com/">Github</a>
<div id="pacman"></div>
<script src="pacman_util.js"></script>
<script src="pacman.js"></script>
<script>
var el = document.getElementById("pacman");
function supports_canvas() {
return !!document.createElement('canvas').getContext;
};
function supports_local_storage() {
return ('localStorage' in window) && window['localStorage'] !== null;
};
if (supports_canvas() && supports_local_storage()) {
window.setTimeout(function () { PACMAN.init(el, "./"); }, 0);
} else {
el.innerHTML = "Sorry, needs a decent browser<br /><small>" +
"(firefox 3.6+, Chrome 4+, Opera 10+ and probably Safari)</small>";
}
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.