File: minimal.html

package info (click to toggle)
ddnet 19.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 68,960 kB
  • sloc: cpp: 195,050; ansic: 58,572; python: 5,568; asm: 946; sh: 941; java: 366; xml: 206; makefile: 31
file content (44 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<style>
		.game {
			position: absolute;
			top: 0px;
			left: 0px;
			margin: 0px;
			border: 0;
			width: 100%;
			height: 100%;
			overflow: hidden;
			display: block;
		}
		</style>
	</head>
	<body>
		<canvas class="game" id="canvas" width="100%" height="100%" oncontextmenu="event.preventDefault()"></canvas>
		<p id="output"></p>
		<script>
			var Module = {
				print: (function() {
					var element = document.getElementById('output');
					return function(text) {
						element.innerHTML += text + "<br>";
					};
				})(),
				printErr: function(text) {
						if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
						if (0) {
							dump(text + '\n');
						}
				},				
				canvas: (function() {
					var canvas = document.getElementById('canvas');
					return canvas;
				})()
			};
		</script>
		<script src="DDNet.js"></script>
	</body>
</html>