aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/context_a.min.js
blob: 82f89e8b6f9224d7185c846a3371bfafe4032890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if(!window.hasOwnProperty("frost_context_a")){
console.log("frost_context_a frost_click_a"),
window.frost_context_a=!0
;var longClick=!1,_frostAContext=function(t){
Frost.longClick(!0),longClick=!0
;var e=t.target||t.currentTarget||t.srcElement
;if(e&&("A"!==e.tagName&&(e=e.parentNode),
"A"!==e.tagName&&(e=e.parentNode),"A"===e.tagName&&"#"!==e.getAttribute("href"))){
var o=e.getAttribute("href")
;if(o.includes("photoset_token"))return
;var n=e.parentNode.innerText
;console.log("Context Content",o,n),Frost.contextMenu(o,n),
t.stopPropagation(),t.preventDefault()
}
}
;document.addEventListener("contextmenu",_frostAContext,!0),document.addEventListener("touchend",function(t){
longClick&&(Frost.longClick(!1),
longClick=!1)
},!0)
}