diff options
Diffstat (limited to 'app/src/main/assets/js/click_a.min.js')
-rw-r--r-- | app/src/main/assets/js/click_a.min.js | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/app/src/main/assets/js/click_a.min.js b/app/src/main/assets/js/click_a.min.js index d858d956..b09e7174 100644 --- a/app/src/main/assets/js/click_a.min.js +++ b/app/src/main/assets/js/click_a.min.js @@ -1,12 +1,17 @@ -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=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() -} -} -;document.addEventListener("click",_frostAClick,!0);
\ No newline at end of file +if(!window.hasOwnProperty("frost_click_a")){ +console.log("Registering frost_click_a"); +window.frost_click_a=true; +var _frostAClick=function(e){ +var element=e.target||e.srcElement; +if(element.tagName!=="A")element=element.parentNode; +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; +console.log("Click Intercept",url); +Frost.loadUrl(url); +e.stopPropagation(); +e.preventDefault(); +}}; +document.addEventListener("click",_frostAClick,true); +}
\ No newline at end of file |