diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-02-22 11:50:49 -0800 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-02-22 11:50:49 -0800 |
| commit | 6a8ae720310021b13f8aec447482f05641c8f908 (patch) | |
| tree | b03e301b1d58811967524938ca1cc7c49ca114b5 /public/index.html | |
| parent | 1938bceb0a478358897371c235860397ae2e3e5c (diff) | |
dirs
Diffstat (limited to 'public/index.html')
| -rw-r--r-- | public/index.html | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/public/index.html b/public/index.html index 9fa2d48..2336d19 100644 --- a/public/index.html +++ b/public/index.html @@ -1,46 +1,17 @@ <!doctype html> <html> <head> -<title>dump2</title> +<title>drawdrawdraw</title> +<link rel="stylesheet" href="/css/drawdrawdraw.css" type="text/css"> <script type="text/javascript" src="/js/zepto.js"></script> <script type="text/javascript" src="/socket.io/socket.io.js"></script> -<style type="text/css"> -#images img { display: block; } -</style> +<script type="text/javascript" src="/js/game.js"></script> +<script type="text/javascript" src="/js/draw.js"></script> </head> <body> -<form method="post" action="/upload" enctype="multipart/form-data"> -<input type="file" name="image"> -<input type="submit"> -</form> - -<div id="images"></div> - </body> <script type="text/javascript"> -var socket = io.connect(window.location.hostname); -var imageCount = 0; -socket.on('join', function(json) { - var data = JSON.parse(json); - for (var i in data) { - appendImage(data[i]); - } -}); -socket.on('url', function(json) { - var data = JSON.parse(json); - appendImage(data); -}); -function appendImage(img) { - var image = new Image(); - image.src = img.url; - $("#images").prepend(image); - imageCount++; - while (imageCount > 20) { - $("#images").children().last().remove(); - imageCount--; - } -} </script> </html> |
