-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
158 lines (143 loc) · 4.6 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rock Paper Scissor</title>
<link href="css/style.css" rel="stylesheet"/>
<link href="css/animate.css" rel="stylesheet"/>
<link href="css/owl.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous"/>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdn.firebase.com/js/client/2.4.2/firebase.js"></script>
<script src="js/main.js"></script>
<!--<script src="js/owl.js"></script>-->
</head>
<body>
<div class="bclrcontainer">
<button class="bclr white" onclick="White(this)"></button>
<button class="bclr black" onclick="Black(this)"></button>
</div>
<div id="startscreen" class="startmodal">
<button id="start" class="start">
<!--Start-->
</button>
</div>
<div id="selectscreen" class="gamecontainer">
<center>
<p id="title" class="text timer">Time to round:<p id="timer" class="text counter">00:05</p></p>
<p id="subtitle" class="text subtitle">Choose your move:</p>
<br>
<div id="rock" class="option rock">
<!--<img src="assets/rock2.png"/>-->
</div>
<div id="paper" class="option paper">
</div>
<br>
<div id="scissor" class="option scissor">
</div>
</center>
</div>
<div id="resultsscreen" class="results">
<div class="playfield player">
<center>
<p id="playerdisplay" class="text">
Player move:
</p>
<div id="usermove" class="option">
</div>
</center>
</div>
<div class="playfield computer">
<center>
<p id="compdisplay" class="text">
Computer move:
</p>
<div id="compmove" class="option">
</div>
</center>
</div>
<center>
<div id="resultsdeclare" class="text resultsdeclare">
</div>
</center>
</div>
<div id="foulscreen" class="foul">
<center>
<div id="fouldeclare" class="text resultsdeclare">
</div>
</center>
</div>
<!--<div id="modal" class="modal1">-->
<!--<center>-->
<!--<!–<textarea class="textbox"></textarea>–>-->
<!--<input type="text" class="form-control" id="feedbackname" placeholder="Name">-->
<!--<button class="btn btn-outline-warning">Submit</button>-->
<!--</center>-->
<!--</div>-->
<!--Owl feedback form-->
<div id="feedback2" class="feedback2">
<div id="feedback1" class="feedback1">
<center><div class="owl">
<div class="hand"></div>
<div class="hand hand-r"></div>
<div class="arms">
<div class="arm"></div>
<div class="arm arm-r"></div>
</div>
</div>
<div class="form">
<!--<p>Feedback</p>-->
<div class="control">
<label for="email" class="fa fa-github-alt"></label>
<input id="email" placeholder="Name" type="text">
</div>
<div class="control">
<label for="password" class="fa fa-info"></label>
<input id="password" placeholder="Feedback" type="text">
</div>
<button class="btn btn-outline-info" onclick="savedata();">Submit</button>
</div>
</center>
</div>
</div>
<script>
$('input[id="password"]').on('focus', function () {
$('*').addClass('password');
}).on('focusout', function () {
$('*').removeClass('password');
});;
</script>
<script type="text/javascript">
var userip="ipnotdetected";
</script>
<script type="text/javascript" src="https://l2.io/ip.js?var=userip"></script>
<script>
var filled2=0;
var data2="";
var messagesRef = new Firebase('https://rps2-257b1.firebaseio.com');
var date=Date();
function savedata(){
filled2=1
var message ="";
message=document.getElementById("email").value;
var feedback="";
feedback=document.getElementById("password").value;
messagesRef.push({fieldName:message, text:feedback,detailsjson:data2,date:date,userIP:userip});
document.getElementById("email").value = '';
document.getElementById("password").value = '';
// document.getElementById("feedback2").style.animationDirection="reverse";
document.getElementById("feedback2").style.display="none";
document.getElementById("feedback2").style.animation="disappear 3s";
}
$.getJSON("http://freegeoip.net/json/", function(data) {
data2=data;
});
window.onbeforeunload = function(){
// Do something
if(filled2!=1)
messagesRef.push({detailsjson:data2,date:date,userIP:userip});
// alert("fired");
}
</script>
</body>
</html>