-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (67 loc) · 2.92 KB
/
index.html
File metadata and controls
69 lines (67 loc) · 2.92 KB
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
<!doctype html>
<html lang="fr"><head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<link rel="icon" type="image/png" href="images/SuperPixelFavicon.png" />
<link rel="stylesheet" type="text/css" href="css/steelshit.css" />
<script type="text/javascript" src="js/jscolor/jscolor.js"></script>
<title>Super Pixel</title>
</head>
<body>
<header class="home">
<div id="homepixel"></div><br />
<a href="index.html" class="logo">Super Pixel<img src="images/SuperPixelLogo.png" /></a>
</header>
<section>
<nav>
<ul id="navigation">
<li><a href="game.html#1">1 Player</a></li>
<li><a href="#" class="multiplayerbutton">MultiPlayer</a></li>
<li><a href="options.html">Options</a></li>
<li><a href="credits.html">Credits</a></li>
</ul>
</nav>
</section>
<div class="glass" style="display:none">
<div class="popup giveMeYourTag">
<div class="formLine">
<label for="playerTag">Super Pseudo :</label>
<input type="text" id="playerTag" value="GrosNull" maxlength="15">
</div>
<div class="formLine">
<label for="playerColor">Super Couleur :</label>
<input class="color" id="playerColor" value="FF0000">
</div>
<div class="formLine">
<a href="game-multi.html#GrosNull&FF0000" class="link" id="okPopupGiveMeYourTag">ok</a>
</div>
</div>
</div>
<script type="text/javascript">
window.onload = function (){
var buttons = document.getElementsByClassName("multiplayerbutton");
var showPopupPseudo = function showPopupPseudo(evt) {
var popup = document.getElementsByClassName("glass")[0];
popup.style.display = 'block';
document.getElementById('playerTag').onchange = function() {
var playerTag = document.getElementById('playerTag').value;
var playerColor = document.getElementById('playerColor').value;
document.getElementById('okPopupGiveMeYourTag').href = 'game-multi.html#'+playerTag+'&'+playerColor;
};
document.getElementById('playerColor').onchange = function() {
var playerTag = document.getElementById('playerTag').value;
var playerColor = document.getElementById('playerColor').value;
document.getElementById('okPopupGiveMeYourTag').href = 'game-multi.html#'+playerTag+'&'+playerColor;
};
};
for(var i=0, len = buttons.length; i<len; i++) {
if(window.location.href.indexOf("github") > -1) {
buttons[i].classList.add("hidden");
} else {
buttons[i].onclick = showPopupPseudo;
}
}
};
</script>
</body>
</html>