From 1df39711abec498d33db728786aaeeb7d1552371 Mon Sep 17 00:00:00 2001 From: Mike Lundy Date: Wed, 13 Jan 2010 00:18:01 -0800 Subject: [PATCH 1/5] whitespace --- main.html | 72 +++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/main.html b/main.html index 86487d4..b6b42b8 100644 --- a/main.html +++ b/main.html @@ -1,7 +1,7 @@ - - - - + + + + @@ -12,60 +12,60 @@ msgbox.style.display="block"; msgbox.innerHTML = m; setTimeout('msgbox.style.display="none";',10000); -} +} function playsound(file) { - $('body').append('\\\\\\<\/embed>\<\/object>'); - setTimeout(function(){ $("#niftyPlayer1").remove(); }, 4000); + $('body').append('\\\\\\<\/embed>\<\/object>'); + setTimeout(function(){ $("#niftyPlayer1").remove(); }, 4000); } - function gotMsg(msg) { - msg = eval("(" + msg + ")"); + function gotMsg(msg) { + msg = eval("(" + msg + ")"); if (msg["say"] != null) { - playsound("http://chapaai.adamsmith.as:8999/speech?text="+msg["say"]); + playsound("http://chapaai.adamsmith.as:8999/speech?text="+msg["say"]); } - if (msg["text"] != null) { - showmsg(msg["text"]); - } - document.getElementById("staff").src = document.getElementById("staff").src; - waitForMsg(); + if (msg["text"] != null) { + showmsg(msg["text"]); + } + document.getElementById("staff").src = document.getElementById("staff").src; + waitForMsg(); } function waitForMsg(){ $('body').append('\ - - + $(document).ready(function(){ + setTimeout(waitForMsg, 4000); + }); + + + -
+
- +

Welcome to Hacker Dojo

NOTICE: Sign-in is now at the front desk... behind you!

-
- -
+
+ +
 
- -
+ +

Currently Staffing

- - -
- - + + +
. - - \ No newline at end of file + + From 85c15e2ac20ee9e7e354ab6e05f3840d89e3b7cc Mon Sep 17 00:00:00 2001 From: Mike Lundy Date: Wed, 13 Jan 2010 00:28:58 -0800 Subject: [PATCH 2/5] move sounds into own file --- main.html | 30 +----------------------------- static/sounds.js | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 static/sounds.js diff --git a/main.html b/main.html index b6b42b8..6bf3928 100644 --- a/main.html +++ b/main.html @@ -4,37 +4,9 @@ + Hacker Dojo Kiosk - diff --git a/static/sounds.js b/static/sounds.js new file mode 100644 index 0000000..433c487 --- /dev/null +++ b/static/sounds.js @@ -0,0 +1,29 @@ +function showmsg(m) { + msgbox = document.getElementById("msg"); + msgbox.style.display="block"; + msgbox.innerHTML = m; + setTimeout('msgbox.style.display="none";',10000); +} + +function playsound(file) { + $('body').append('\\\\\\<\/embed>\<\/object>'); + setTimeout(function(){ $("#niftyPlayer1").remove(); }, 4000); +} + +function gotMsg(msg) { + msg = eval("(" + msg + ")"); + if (msg["say"] != null) { + playsound("http://chapaai.adamsmith.as:8999/speech?text="+msg["say"]); + } + if (msg["text"] != null) { + showmsg(msg["text"]); + } + document.getElementById("staff").src = document.getElementById("staff").src; + waitForMsg(); +} + +function waitForMsg(){ $('body').append('\ + + Hacker Dojo Kiosk -
- +
+
- + HackerDojo Logo

Welcome to Hacker Dojo

@@ -22,18 +23,18 @@

NOTICE: Sign-in is now at the front desk... behind you!

-
+
 
-
+

Currently Staffing

- +
- -
-

Currently Staffing

- - - +
+
+

Currently Staffing

+ +
. diff --git a/static/sounds.js b/static/sounds.js index 433c487..8a482cc 100644 --- a/static/sounds.js +++ b/static/sounds.js @@ -1,3 +1,27 @@ +function letsDance() { + document.body.style.background="#"+randhex()+randhex()+randhex()+randhex()+randhex()+randhex(); + var fore = "#"+randhexlight()+randhexlight()+randhexlight()+randhexlight()+randhexlight()+randhexlight(); + + $(".jiggle").each(function(i) { + this.style.color = fore; + this.style.position = "relative"; + this.style.top = jiggly()+"px"; + this.style.left = Math.floor(Math.round(Math.random() * 20))+"px"; + }); +} + +function jiggly() { + return 10-Math.floor(Math.round(Math.random() * 20)); +} + +function randhex() { + return String.fromCharCode(97 + Math.round(Math.random() * 6)); +} + +function randhexlight() { + return Math.round(Math.random() * 6); +} + function showmsg(m) { msgbox = document.getElementById("msg"); msgbox.style.display="block"; @@ -25,5 +49,6 @@ function gotMsg(msg) { function waitForMsg(){ $('body').append('\