arnaucube
arnaucube/class2contextPublic Self-hosted repository
small improvement on changing dom solution
arnau idoctnef@openmailbox.org
Wed, 17 Aug 2016 11:44:45 +0200
commit

af171bf75fa054d5a24695b9e851f7847c50f3cb

parent

30facc9263108e6125cff6b3651e356ed7cad265

1 files changed, 13 insertions(+), 2 deletions(-)

jump to
M class2context.js → class2context.js

@@ -12,13 +12,24 @@ [["option1", "functionoption1()"], ["option 2","functionoption2()"]]

); */ -/* testing this, not necessary +/* testing this, not necessary */ +var cmCallNum=0; $( document ).ready(function() { $(document).on('contextmenu', function (e) { //e.preventDefault(); + /*//testing only + console.log('ContextMenus() called, num.' + cmCallNum); + cmCallNum++;*/ ContextMenus(); }); -});*/ + $(document).on('click', function (e) { + //e.preventDefault(); + /*//testing only + console.log('ContextMenus() called, num.' + cmCallNum); + cmCallNum++;*/ + ContextMenus(); + }); +}); /* MUTATION OBSERVER