Permalink
Browse files

add reload

  • Loading branch information...
yuiseki committed Apr 11, 2012
1 parent 8f0eec0 commit a13c40c5c49ac13c3c3a59dbd2cb5abb61d11643
Showing with 7 additions and 0 deletions.
  1. +6 −0 public/javascripts/yabai.coffee
  2. +1 −0 views/admin.html.eco
@@ -23,6 +23,9 @@ socket.on 'youpy', (msg) ->
href: 'http://oq.la/y2'
$('head').append($('<link>').attr(attr))
+socket.on 'reload', (msg) ->
+ location.reload()
+
socket.on 'announce', (msg) ->
$('#announce').text(msg.announce)
@@ -35,6 +38,9 @@ socket.on 'announce', (msg) ->
@youpy = ()->
socket.emit 'youpy', [1]
+@reload = ()->
+ socket.emit 'reload', [1]
+
@announce = ()->
data =
announce: $('#announce').val()
View
@@ -1,6 +1,7 @@
<h1><%= @data.title %></h1>
<button onClick='oquno();' type='button' name='oquno' value='oquno'>o☆qu☆no</button>
<button onClick='youpy();' type='button' name='youpy' value='youpy'>yo☆u☆py</button>
+<button onClick='reload();' type='button' name='reload' value='reload'>reload!!!!!!!!!!!!!!!!!!!!!!!</button>
<button onClick='pikachu();' type='button' name='pikachu' value='pikachu'>pi☆ka☆chu</button>
<br />
<input id='announce' type='text' />

2 comments on commit a13c40c

@takano32

This comment has been minimized.

Show comment Hide comment
@takano32

takano32 Apr 13, 2012

Owner

reload 自己主張強すぎだろ。

Owner

takano32 replied Apr 13, 2012

reload 自己主張強すぎだろ。

@takano32

This comment has been minimized.

Show comment Hide comment
@takano32

takano32 Apr 13, 2012

Owner

socket.boradcast.emit も足りない予感

Owner

takano32 replied Apr 13, 2012

socket.boradcast.emit も足りない予感

Please sign in to comment.