mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-09 22:59:13 +07:00
40 lines
1.5 KiB
HTML
40 lines
1.5 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Mindustry</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<link href="styles.css" rel="stylesheet" type="text/css">
|
|
<script src="soundmanager2-setup.js"></script>
|
|
<script src="soundmanager2-jsmin.js"></script>
|
|
</head>
|
|
|
|
<body onkeydown="preventUseOfDefaultKeys(event);" oncontextmenu="return false;">
|
|
<div align="center" id="embed-html"></div>
|
|
<script type="text/javascript" src="html/html.nocache.js"></script>
|
|
</body>
|
|
<script>
|
|
function handleMouseDown(evt) {
|
|
evt.preventDefault();
|
|
evt.stopPropagation();
|
|
evt.target.style.cursor = 'default';
|
|
window.focus();
|
|
}
|
|
|
|
function handleMouseUp(evt) {
|
|
evt.preventDefault();
|
|
evt.stopPropagation();
|
|
evt.target.style.cursor = '';
|
|
}
|
|
|
|
|
|
function preventUseOfDefaultKeys(event) {
|
|
if (event.keyCode == 32 || event.keyCode == 27 || event.keyCode == 38 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 40) {
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
|
|
document.getElementById('embed-html').addEventListener('mousedown', handleMouseDown, false);
|
|
document.getElementById('embed-html').addEventListener('mouseup', handleMouseUp, false);
|
|
</script>
|
|
</html>
|