annotate index.html @ 4:5507443a71c0

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