diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-15 15:49:20 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-15 15:49:20 -0700 |
commit | 9e0044f8789a47a41933d341b968fe0a6bc22b6d (patch) | |
tree | 551096bd404331a39022e81853aff003236bb234 /app/src/main/assets/js/click_interceptor.js | |
parent | 610c37698ab93b8d51efcaec9f721292cacfd854 (diff) | |
download | frost-9e0044f8789a47a41933d341b968fe0a6bc22b6d.tar.gz frost-9e0044f8789a47a41933d341b968fe0a6bc22b6d.tar.bz2 frost-9e0044f8789a47a41933d341b968fe0a6bc22b6d.zip |
Add full theming
Diffstat (limited to 'app/src/main/assets/js/click_interceptor.js')
-rw-r--r-- | app/src/main/assets/js/click_interceptor.js | 13 |
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); + } +}; |