Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (17 sloc) 466 Bytes
factory = (method, callback) ->
->
chrome.extension.sendMessage
method: method,
callback
getStatus = factory 'status', (r) ->
if r.enabled
$('#disable').show()
else
$('#enable').show()
jQuery ->
buttons = document.querySelectorAll 'div.button'
for elt in buttons
elt.addEventListener 'click', (e) ->
do factory e.target.id, ->
do window.close
do getStatus