-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
31 lines (29 loc) · 952 Bytes
/
test.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Pyro Library Tester</title>
<script src="https://cdn.firebase.com/js/client/2.0.5/firebase.js"></script>
<script src="pyro.js"></script>
<script>
var pyro = new Pyro({url:"https://kyper-snapsell.firebaseio.com", name:'kyper-snapsell'});
var signup = function(){
var email = getRandomInt(0,50) + '@' + getRandomInt(0,50) +'.com';
var testUser = {email:email, password:'a'}
pyro.userSignup(testUser,function(returnedUser){
console.log('signup successful:', returnedUser);
});
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
</script>
</head>
<body>
<div style="text-align:center;">
<h2>Pyro Library Tester</h2>
<button onclick="signup()">Test Signup</button>
</div>
</body>
</html>