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.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/assets/js/click_interceptor.js b/app/src/main/assets/js/click_interceptor.js
new file mode 100644
index 00000000..68dbac2b
--- /dev/null
+++ b/app/src/main/assets/js/click_interceptor.js
@@ -0,0 +1,13 @@
+// generic click handler
+document.onclick = function(e) {
+ e = e || window.event;
+ 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);
+ }
+};