diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-13 17:07:09 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-13 17:07:09 -0700 |
commit | 0ac9d2181536b79a6057c3b526f32a1cc8ac4704 (patch) | |
tree | b561acf7fc94a79e8a48b548489e0f544d402b8c /app/src/main/assets/js/menu_click.js | |
parent | e4377fed20ce1e3f4a0b236271eecdb1fe573b7a (diff) | |
download | frost-0ac9d2181536b79a6057c3b526f32a1cc8ac4704.tar.gz frost-0ac9d2181536b79a6057c3b526f32a1cc8ac4704.tar.bz2 frost-0ac9d2181536b79a6057c3b526f32a1cc8ac4704.zip |
Created working workaround for menu item
Diffstat (limited to 'app/src/main/assets/js/menu_click.js')
-rw-r--r-- | app/src/main/assets/js/menu_click.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/src/main/assets/js/menu_click.js b/app/src/main/assets/js/menu_click.js new file mode 100644 index 00000000..5698cbf0 --- /dev/null +++ b/app/src/main/assets/js/menu_click.js @@ -0,0 +1,16 @@ +// we will handle click events +document.onclick = function(e) { + e.preventDefault ? e.preventDefault() : e.returnValue = false; + 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('Click Intercept'); + console.log(url); + if (url !== "https://m.facebook.com/settings" && url !== "https://m.facebook.com/settings#" && url !== "https://m.facebook.com/settings#!/settings?soft=bookmarks") + Frost.loadUrl(url); + Frost.reloadBaseUrl(); //temporary workaround + } +}; |