aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/menu_click.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js/menu_click.js')
-rw-r--r--app/src/main/assets/js/menu_click.js16
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
+ }
+};