aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-22 23:31:18 -0700
committerAllan Wang <me@allanwang.ca>2017-06-22 23:31:18 -0700
commit1d2f1d902569c5db2b928e152dda1ff322bb7fa1 (patch)
tree53a95b9ffc905dea0f9717c311c34f937eee04ea /app/src/main/assets/js
parentda5967f87b8a0e9863fb6b82fc5807bae9e62a00 (diff)
downloadfrost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.tar.gz
frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.tar.bz2
frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.zip
Add workaround for depth 2 links
Diffstat (limited to 'app/src/main/assets/js')
-rw-r--r--app/src/main/assets/js/click_a.js5
-rw-r--r--app/src/main/assets/js/click_a.min.js3
2 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/assets/js/click_a.js b/app/src/main/assets/js/click_a.js
index d3eb8631..a960c4f2 100644
--- a/app/src/main/assets/js/click_a.js
+++ b/app/src/main/assets/js/click_a.js
@@ -3,8 +3,9 @@ console.log('Registering frost_a click');
var _frostAClick = function(e) {
var element = e.target || e.srcElement;
- if (element.tagName !== 'A')
- element = element.parentNode;
+ if (element.tagName !== 'A') element = element.parentNode;
+ //Notifications is two layers under
+ if (element.tagName !== 'A') element = element.parentNode;
if (element.tagName === 'A' && element.getAttribute('href') !== '#') {
var url = element.getAttribute('href');
console.log('Click Intercept', url);
diff --git a/app/src/main/assets/js/click_a.min.js b/app/src/main/assets/js/click_a.min.js
index ff4a3d4c..d858d956 100644
--- a/app/src/main/assets/js/click_a.min.js
+++ b/app/src/main/assets/js/click_a.min.js
@@ -2,7 +2,8 @@ console.log("Registering frost_a click")
;var _frostAClick=function(t){
var e=t.target||t.srcElement
-;if("A"!==e.tagName&&(e=e.parentNode),"A"===e.tagName&&"#"!==e.getAttribute("href")){
+;if("A"!==e.tagName&&(e=e.parentNode),"A"!==e.tagName&&(e=e.parentNode),
+"A"===e.tagName&&"#"!==e.getAttribute("href")){
var r=e.getAttribute("href")
;console.log("Click Intercept",r),Frost.loadUrl(r),t.stopPropagation(),
t.preventDefault()