Mercurial > web
diff tomoko.html @ 6:ac2f9715807c
first version
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 30 May 2021 18:07:38 -0400 |
parents | |
children | e22a954c2714 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tomoko.html Sun May 30 18:07:38 2021 -0400 @@ -0,0 +1,57 @@ +<!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> \ No newline at end of file