Skip to content

Commit c14eb1b

Browse files
committed
Update index.htm
1 parent 04c9abd commit c14eb1b

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

‎index.htm‎

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
<!DOCTYPE html>
2-
<html manifest="snake.appcache">
2+
<!--<html manifest="snake.appcache">-->
33
<head>
44
<!--
55
66
JavaScript Snake
77
By Patrick Gillespie
88
http://patorjk.com/games/snake
99
10-
Soure code is available here: https://github.com/patorjk/JavaScript-Snake
10+
Source code is available here: https://github.com/patorjk/JavaScript-Snake
1111
1212
-->
1313
<title>JavaScript Snake</title>
14-
<link rel="stylesheet" type="text/css" href="./css/snake.css" />
15-
16-
<script type="text/javascript">
14+
<link rel=stylesheet id=style type=text/css href=./css/main-snake.css />
15+
<button onclick=getTheme()>Click to use this theme.</button>
16+
<select id="select">
17+
<option>Dark Theme</option>
18+
</select>
19+
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
20+
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
21+
<script>
22+
function getTheme () {
23+
function changeTheme (Theme) {
24+
document.getElementById('style').setAttribute('href', Theme);
25+
}
26+
var index = document.getElementById("select").selectedIndex;
27+
switch (index) {
28+
case 0:
29+
changeTheme('css/dark-snake.css');
30+
}
31+
}
1732
if (navigator.onLine && window.location.hostname === 'patorjk.com') {
1833
var _gaq = _gaq || [];
1934
_gaq.push(['_setAccount', 'UA-3312460-1']);
@@ -37,5 +52,6 @@
3752
fullScreen: true
3853
});
3954
</script>
55+
<div id="high-score-dialog"></div>
4056
</body>
41-
</html>
57+
</html>

0 commit comments

Comments
 (0)