aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_a.min.js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-10-24 23:29:55 -0400
committerGitHub <noreply@github.com>2017-10-24 23:29:55 -0400
commitc2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66 (patch)
treea54665bb873b650b8f6f03b76cd59456ef79e296 /app/src/main/assets/js/click_a.min.js
parent64dbf74b7a44a25f41ed7ff2ebfa11db0bc91769 (diff)
downloadfrost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.tar.gz
frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.tar.bz2
frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.zip
WIP: Feature/pip video 2 (#405)
* Add dependency * Test new video view * Add initial video bindings * Implement drag to dismiss * Begin initial integration * Fix typo * Fix up url formatter * Update changelog * Create first fully integrated video build * Update translations * Update translations 2
Diffstat (limited to 'app/src/main/assets/js/click_a.min.js')
-rw-r--r--app/src/main/assets/js/click_a.min.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/src/main/assets/js/click_a.min.js b/app/src/main/assets/js/click_a.min.js
index 2033fd31..a0df6912 100644
--- a/app/src/main/assets/js/click_a.min.js
+++ b/app/src/main/assets/js/click_a.min.js
@@ -5,16 +5,18 @@ window.frost_click_a=!0
var t=e.target||e.srcElement
;if("A"!==t.tagName&&(t=t.parentNode),"A"!==t.tagName&&(t=t.parentNode),
"A"===t.tagName&&!prevented){
-var n=t.getAttribute("href")
-;console.log("Click Intercept",n),"undefined"!=typeof Frost&&Frost.loadUrl(n)&&(e.stopPropagation(),
+var o=t.getAttribute("href")
+;console.log("Click Intercept",o),"undefined"!=typeof Frost&&Frost.loadUrl(o)&&(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)
+;document.addEventListener("click",_frostAClick,!0)
+;var clickTimeout
+;document.addEventListener("touchstart",function(e){
+clickTimeout=setTimeout(_frostPreventClick,400)
},!0),document.addEventListener("touchend",function(e){
-prevented=!1
+prevented=!1,clearTimeout(clickTimeout)
},!0)
} \ No newline at end of file