-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
135 lines (123 loc) · 4.25 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<<<<<<< HEAD
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>RNA invaders - the game</title>
<link rel="stylesheet" type="text/css" href="main.css" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/easeljs-0.6.1.min.js"></script>
<script src="js/preloadjs-0.3.1.min.js"></script>
<script src="js/soundjs-NEXT.min.js"></script>
<script src="js/soundjs.flashplugin-NEXT.min.js"></script>
<script src="js/soundjs.flashplugin-0.4.1.min.js"></script>
<script src="js/soundjs-0.4.1.min.js"></script>
<script src="js/rna.js" type="text/javascript"></script>
<script src="js/data.js" type="text/javascript"></script>
<script type="text/javascript">
/* lets begin the actual code */
function main(){
$('#Start').click(function(){Start()});
function Start() {
var keys = [37, 38, 39, 40, 32];
function disable_scroll() {
// if (window.addEventListener) {
// window.addEventListener('DOMMouseScroll', wheel, false);
// }
// window.onmousewheel = document.onmousewheel = wheel;
document.onkeydown = keydown;
}
function enable_scroll() {
if (window.removeEventListener) {
window.removeEventListener('DOMMouseScroll', wheel, false);
}
window.onmousewheel = document.onmousewheel = document.onkeydown = null;
}
function preventDefault(e) {
e = e || window.event;
if (e.preventDefault)
e.preventDefault();
e.returnValue = false;
}
function keydown(e) {
for (var i = keys.length; i--;) {
if (e.keyCode === keys[i]) {
preventDefault(e);
return;
}
}
}
function wheel(e) {
preventDefault(e);
}
var seq = $('#sequence').val();
// alert(seq);
// $('#Start').disable=true;
// $("#Start").removeAttr('data-disable-with');
// $("#Start").prop('disabled', true);
// alert('Prepare for Impact');
if (typeof seq == 'string' && seq.length){
// alert('Prepare for hungry RNA');
$('#Start').hide();
disable_scroll();
/* tried to change the canvas background color, does not work
var canvas = document.getElementById('mainCanvas');
var context = canvas.getContext('2d');
context.fillStyle = "#C0C0C0";
context.fill();
// $('#mainCanvas').canvas("background-color","#C0C0C0");
*/
var game = new Game(seq);
game.Init();
}
else{
alert('Coward, insert Sequence to face an enemy!');
$("#Start").prop('disabled', false);
enable_scroll();
}
}
}
/* start the main() function onload */
$(function(){ main();});
//$(function(){ $("#Start").mousedown(main()); });
</script>
</head>
<body>
<form name="ChooseYourEnemy" method="post" onsubmit="return fold();">
<label style="position:relative; z-index:6;">InvadRNA</label>
<input id="sequence" name="sequence" type="text" style="position:relative; z-index:6;"><br>
</form>
<div id="maincontainer">
<a style="position:relative; top:50px; left:0%;" id="Start">
<img src="./graphics/logo.png" alt="logo" style="position:absolute; z-index:6;">
</a>
<canvas id="mainCanvas" width="600" height="600">Canvas is not supported</canvas>
<img src="./graphics/uppercanvasdelimiter.png" alt="uppercanvasdelimiter"
style="position:relative; left:-2px; top:16px; z-index:8;">
<img src="./graphics/lowercanvasdelimiter.png" alt="lowercanvasdelimiter"
style="position:relative; left:-4px; top:482px; z-index:8;">
</div>
<span id="printHere"></span>
</body>
=======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Ronny Lorenz - home</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/rna.js" type="text/javascript"></script>
<script src="js/ViennaRNA.js" type="text/javascript"></script>
</head>
<body>
<div id="maincontainer">
<div class="content">
<form name="foldingtest" method="post" onsubmit="return fold();" action="">
<label>Sequence</label>
<input id="sequence" name="sequence" type="text" /></br>
<input name="button" type="submit" class="Button" value="Fold!" />
</form>
</div>
</div>
</body>
>>>>>>> b356a20cc9f4d0fbdb4fe7d58b23d3738afbe8ec
</html>