aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_interceptor.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js/click_interceptor.js')
-rw-r--r--app/src/main/assets/js/click_interceptor.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/app/src/main/assets/js/click_interceptor.js b/app/src/main/assets/js/click_interceptor.js
index 238b31d3..ce55f669 100644
--- a/app/src/main/assets/js/click_interceptor.js
+++ b/app/src/main/assets/js/click_interceptor.js
@@ -1,15 +1,6 @@
-// generic click handler
-document.on('click', function (e) {
- e = e || window.event;
- e.preventDefault();
+// we will handle click events
+console.log('Registering click interceptor');
+document.addEventListener('click', function _menuClick(e) {
var element = e.target || e.srcElement;
- if (element.tagName !== 'A')
- element = element.parentNode;
- if (element.tagName === 'A') {
- var url = element.href;
- console.log('Generic Click Intercept');
- console.log(url);
- // Frost.loadUrl(url);
- }
- return false;
-});
+ console.log(element.tagName);
+}, true);