-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
76 lines (69 loc) · 2 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
<!DOCTYPE html>
<html>
<head>
<title>Hacker Club Project One</title>
<script type="text/javascript" src="http://l2.io/ip.js?var=myip"></script>
<script src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="src/d3/d3.js"></script>
<link rel="stylesheet" type="text/css" href="lib/style.css"/>
<script>
// Socket.io Initialization
var socket = io.connect();
var gClient = {};
// Custom metrics objects
var randId = Math.floor(Math.random()*1000000000);
function Shlock(kind, method, url, data) {
this.kind = kind;
this.method = method;
this.url = url;
this.data = data;
this.time = new Date().toJSON();
};
// Tracking IP of visitors, logging time as well.
function Client(IP, ID) {
this.IP = IP;
this.ID = ID;
};
Client.prototype.toString = function() {
var self = this;
return this.IP+' '+this.ID;
}
function clientIp() {
console.log('Executing clientIp');
var client = new Client(myip, randId);
console.log(client);
var ev = new Shlock('web', 'client', '/index.html', client);
console.log(ev);
socket.emit('client', ev);
console.log(myip);
}
setTimeout(clientIp,1000);
</script>
</head>
<body>
<p>
This page is part of a project on <a href="https://github.com/garrettwilkin/HackerClubProjectOne">github</a>.
<br>
Authored by: <a href="https://github.com/garrettwilkin">Garrett Wilkin</a>
<br>
</p>
<p>
<img src="img/HackerClub.jpeg">
</p>
<p>
List of projects:
<ol>
<li>
<a href="circle.html">Circle transformation triggered by HTTP requests</a>
</li>
<li>
<a href="force.html">Real-time collaborative physics simulation</a>
</li>
<li>
<a href="replay.html">Replay of collaborative physics simulation activity</a>
</li>
</p>
<script src="src/jquery/jquery-1.8.1.min.js"></script>
<script src="src/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>