1
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
diff
changeset
|
1 <!DOCTYPE html>
|
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
diff
changeset
|
2 <head>
|
4
|
3 <style>
|
|
4 body{
|
|
5 margin:0;
|
|
6 background-image: url("tomoko.gif");
|
|
7 background-position: center top;
|
|
8 background-size: 100% auto;
|
|
9 text-align: center;
|
|
10 }
|
|
11 </style>
|
|
12 <script>
|
|
13 window['libopenmpt'] = {};
|
|
14 libopenmpt.locateFile = function (filename) {
|
|
15 return filename;
|
|
16 };
|
|
17 libopenmpt.onRuntimeInitialized = function () {
|
|
18 if (document.referrer) {
|
|
19 init();
|
|
20 path = "https://api.modarchive.org/downloads.php?moduleid=37049#christms.xm";
|
|
21 if (player != undefined) {
|
|
22 player.load(path, afterLoad.bind(this, path));
|
|
23 }
|
|
24 document.getElementById('button').style.visibility = "hidden";
|
|
25 }
|
|
26 else {
|
|
27 document.getElementById('button').style.visibility = "visible";
|
|
28 }
|
|
29 var player;
|
|
30 function init() {
|
|
31 if (player == undefined) {
|
|
32 player = new ChiptuneJsPlayer(new ChiptuneJsConfig(-1));
|
|
33 }
|
|
34 else {
|
|
35 player.stop();
|
|
36 player = undefined;
|
|
37 }
|
|
38 };
|
|
39 function afterLoad(path, buffer) {
|
|
40 player.play(buffer);
|
|
41 };
|
|
42 document.getElementById('button').onclick = function() {
|
|
43 init();
|
|
44 path = "https://api.modarchive.org/downloads.php?moduleid=37049#christms.xm";
|
|
45 if (player != undefined) {
|
|
46 player.load(path, afterLoad.bind(this, path));
|
|
47 }
|
|
48 document.getElementById('button').style.visibility = "hidden";
|
|
49 };
|
|
50 }
|
|
51 </script>
|
|
52 <script src="libopenmpt.js"></script>
|
|
53 <script src="chiptune2.js"></script>
|
1
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
diff
changeset
|
54 </head>
|
4
|
55 <body id="body">
|
|
56 <br>
|
|
57 <input id="button" type="submit" name="button" value="epicness" style="visibility:hidden;"></input>
|
|
58 </body>
|