diff options
Diffstat (limited to 'app/src/main/assets/js/click_interceptor.js')
-rw-r--r-- | app/src/main/assets/js/click_interceptor.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/src/main/assets/js/click_interceptor.js b/app/src/main/assets/js/click_interceptor.js index 68dbac2b..238b31d3 100644 --- a/app/src/main/assets/js/click_interceptor.js +++ b/app/src/main/assets/js/click_interceptor.js @@ -1,13 +1,15 @@ // generic click handler -document.onclick = function(e) { +document.on('click', function (e) { e = e || window.event; + e.preventDefault(); var element = e.target || e.srcElement; if (element.tagName !== 'A') - element = element.parentNode; + element = element.parentNode; if (element.tagName === 'A') { - var url = element.href; - console.log('Generic Click Intercept'); - console.log(url); - Frost.loadUrl(url); + var url = element.href; + console.log('Generic Click Intercept'); + console.log(url); + // Frost.loadUrl(url); } -}; + return false; +}); |