-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
66 lines (63 loc) · 2.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE HTML>
<html lang=en>
<head>
<meta charset=utf-8 />
<title>JavaScript TextMode Image Library</title>
<link rel=stylesheet type=text/css href=css/canvas.css />
<script type=text/javascript src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type=text/javascript src="js/jquery.url.js"></script>
<script type=text/javascript src=js/textmode.js></script>
<script type=text/javascript>
window.onload = function() {
var image;
var url;
if( ( url = $.url().param( 'sauce' ) ) != null ) {
image = new ImageTextModeSAUCE();
image.parseUrl( url );
console.debug( image );
return;
}
if( ( url = $.url().param( 'xbin' ) ) != null ) {
image = new ImageTextModeXBin();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'ansi' ) ) != null ) {
image = new ImageTextModeANSI();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'bin' ) ) != null ) {
image = new ImageTextModeBin();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'idf' ) ) != null ) {
image = new ImageTextModeIDF();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'adf' ) ) != null ) {
image = new ImageTextModeADF();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'tundra' ) ) != null ) {
image = new ImageTextModeTundra();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'pcboard' ) ) != null ) {
image = new ImageTextModePCBoard();
image.parseUrl( url );
}
else if( ( url = $.url().param( 'avatar' ) ) != null ) {
image = new ImageTextModeAVATAR();
image.parseUrl( url );
}
else {
image = new ImageTextModeANSI();
image.parse( '[0m[1;30mT[5;37;44mE[0;34;44mS[0;33;42mT[37;40m' );
}
image.renderCanvas( document.getElementById( 'canvas' ) );
};
</script>
</head>
<body>
<canvas id=canvas></canvas>
</body>
</html>