aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js')
-rw-r--r--app/src/main/assets/js/click_interceptor.js13
-rw-r--r--app/src/main/assets/js/click_interceptor.min.js1
-rw-r--r--app/src/main/assets/js/menu_click.js3
-rw-r--r--app/src/main/assets/js/menu_click.min.js2
4 files changed, 17 insertions, 2 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);
+ }
+};
diff --git a/app/src/main/assets/js/click_interceptor.min.js b/app/src/main/assets/js/click_interceptor.min.js
new file mode 100644
index 00000000..5f10dd2b
--- /dev/null
+++ b/app/src/main/assets/js/click_interceptor.min.js
@@ -0,0 +1 @@
+document.onclick=function(c){c=c||window.event;var b=c.target||c.srcElement;if(b.tagName!=="A"){b=b.parentNode}if(b.tagName==="A"){var a=b.href;console.log("Generic Click Intercept");console.log(a);Frost.loadUrl(a)}}; \ No newline at end of file
diff --git a/app/src/main/assets/js/menu_click.js b/app/src/main/assets/js/menu_click.js
index 3bd0314f..65c1c401 100644
--- a/app/src/main/assets/js/menu_click.js
+++ b/app/src/main/assets/js/menu_click.js
@@ -8,8 +8,9 @@ document.onclick = function(e) {
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")
+ 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
+ }
}
};
diff --git a/app/src/main/assets/js/menu_click.min.js b/app/src/main/assets/js/menu_click.min.js
index d6c45a74..14ac7e76 100644
--- a/app/src/main/assets/js/menu_click.min.js
+++ b/app/src/main/assets/js/menu_click.min.js
@@ -1 +1 @@
-document.onclick=function(c){c=c||window.event;var b=c.target||c.srcElement;if(b.tagName!=="A"){b=b.parentNode}if(b.tagName==="A"){var a=b.href;console.log("Click Intercept");console.log(a);if(a!=="https://m.facebook.com/settings"&&a!=="https://m.facebook.com/settings#"&&a!=="https://m.facebook.com/settings#!/settings?soft=bookmarks"){Frost.loadUrl(a)}Frost.reloadBaseUrl()}}; \ No newline at end of file
+document.onclick=function(c){c=c||window.event;var b=c.target||c.srcElement;if(b.tagName!=="A"){b=b.parentNode}if(b.tagName==="A"){var a=b.href;console.log("Click Intercept");console.log(a);if(a!=="https://m.facebook.com/settings"&&a!=="https://m.facebook.com/settings#"&&a!=="https://m.facebook.com/settings#!/settings?soft=bookmarks"){Frost.loadUrl(a);Frost.reloadBaseUrl()}}}; \ No newline at end of file