aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_a.min.js
blob: b09e71742cf35d9cd6f7802e86717d85e4bda0b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
}