aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_a.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js/click_a.js')
-rw-r--r--app/src/main/assets/js/click_a.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/src/main/assets/js/click_a.js b/app/src/main/assets/js/click_a.js
index 9f4ddc38..24a08f56 100644
--- a/app/src/main/assets/js/click_a.js
+++ b/app/src/main/assets/js/click_a.js
@@ -15,17 +15,16 @@ if (!window.hasOwnProperty('frost_click_a')) {
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');
- if (url.includes('photoset_token')) return;
-
-
+ if (element.tagName === 'A') {
if (!prevented) {
+ var url = element.getAttribute('href');
console.log('Click Intercept', url);
- if (typeof Frost !== 'undefined') Frost.loadUrl(url);
+ // if frost is injected, check if loading the url through an overlay works
+ if (typeof Frost !== 'undefined' && Frost.loadUrl(url)) {
+ e.stopPropagation();
+ e.preventDefault();
+ }
}
- e.stopPropagation();
- e.preventDefault();
}
}