annotate tomoko.html @ 9:f8f852d8c466

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