aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_a.min.js
blob: c7870e2fbff4ee2e493fa886309063a5bf8c1e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if(!window.hasOwnProperty("frost_click_a")){
console.log("Registering frost_click_a"),
window.frost_click_a=!0
;var prevented=!1,_frostAClick=function(e){
var t=e.target||e.srcElement
;if("A"!==t.tagName&&(t=t.parentNode),"A"!==t.tagName&&(t=t.parentNode),
"A"===t.tagName&&"#"!==t.getAttribute("href")){
var n=t.getAttribute("href")
;if(n.includes("photoset_token"))return
;prevented||(console.log("Click Intercept",n),
"undefined"!=typeof Frost&&Frost.loadUrl(n)),
e.stopPropagation(),e.preventDefault()
}
},_frostPreventClick=function(){
console.log("Click prevented"),prevented=!0
}
;document.addEventListener("click",_frostAClick,!0),document.addEventListener("touchstart",function(e){
setTimeout(_frostPreventClick,400)
},!0),document.addEventListener("touchend",function(e){
prevented=!1
},!0)
}