view tomoko.html @ 7:e22a954c2714

i fucked up
author Paper <mrpapersonic@gmail.com>
date Sun, 30 May 2021 18:10:36 -0400
parents index.html@5507443a71c0 index.html@ac2f9715807c
children e7ca289b45ec
line wrap: on
line source

<!DOCTYPE html>
<head>
	<style>
		body{
			margin:0;
		    background-image: url("tomoko.gif");
			background-position: center top;
			background-size: 100% auto;
			text-align: center;
		}
	</style>
	<script>
		window['libopenmpt'] = {};
		libopenmpt.locateFile = function (filename) {
			return filename;
		};
		libopenmpt.onRuntimeInitialized = function () {
			if (document.referrer) {
				init();
				path = "https://api.modarchive.org/downloads.php?moduleid=37049#christms.xm";
				if (player != undefined) {
					player.load(path, afterLoad.bind(this, path));
				}
			}
			else {
				document.getElementById('button').style.visibility = "visible";
			}
			var player;
			function init() {
				if (player == undefined) {
					player = new ChiptuneJsPlayer(new ChiptuneJsConfig(-1));
				}
				else {
					player.stop();
					player = undefined;
				}
			};
			function afterLoad(path, buffer) {
				player.play(buffer);
			};
			document.getElementById('button').onclick = function() {
				init();
				path = "https://api.modarchive.org/downloads.php?moduleid=37049#christms.xm";
				if (player != undefined) {
					player.load(path, afterLoad.bind(this, path));
				}
				document.getElementById('button').style.visibility = "hidden";
			};
		}
	</script>
	<script src="libopenmpt.js"></script>
	<script src="chiptune2.js"></script>
</head>
<body id="body">
	<br>
	<input id="button" type="submit" name="button" value="epicness" style="visibility: hidden;">
</body>