aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/index.html b/index.html
index 4dd9c54..64d6c29 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,7 @@
<head>
<title>chessn't</title>
<link rel="icon" href="icon.png">
+ <script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script> <!-- thank you to these kind people :D -->
<style>
html,
body {
@@ -64,7 +65,13 @@ body::-webkit-scrollbar {
</div>
<script>
-
+var peer = new Peer();
+peer.on('connection', function(conn) {
+ conn.on('data', function(data){
+ // Will print 'hi!'
+ console.log(data);
+ });
+});
//colors
var board1 = '#232323'
var board2 = '#ff6633'