Skip to content

Commit

Permalink
added clickHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermg committed Apr 13, 2015
1 parent c8e538e commit a227bf8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 0 additions & 2 deletions client/meteor-skeleton.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ <h2>Heading</h2>
<div class="container">
<h1>Welcome to Meteor!</h1>

{{> loginButtons }}

{{> hello}}
</div>

Expand Down
24 changes: 22 additions & 2 deletions client/recorder.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@

console.log 'recorder'

installClickHandler = () ->
$('html').off 'click'
$('html').on 'click', (e) ->
console.log 'clicked: ', e

installToolbar = () ->
$('body').prepend '<div>TOOLBAR</div>'

$(document).ready () ->
$('.element').on 'contextmenu', (el) ->
console.log el
MutationObserver = window.MutationObserver || window.WebKitMutationObserver

observer = new MutationObserver (mutations, observer) ->
installClickHandler()

observer.observe document, {
childList: true,
attributes: true,
subtree: true,
characterData: true
}

installToolbar()
installClickHandler()

0 comments on commit a227bf8

Please sign in to comment.