aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/context_a.min.js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-08 03:03:55 -0400
committerGitHub <noreply@github.com>2017-07-08 03:03:55 -0400
commitb10a745c7f0f46f4f014e1ba7fa71172d7442b83 (patch)
treeef2516b69fb04ec0f565c5bb569fd5d80b7bd262 /app/src/main/assets/js/context_a.min.js
parent6adfc496374eb88919f70a240eb15a726d2c18e0 (diff)
downloadfrost-b10a745c7f0f46f4f014e1ba7fa71172d7442b83.tar.gz
frost-b10a745c7f0f46f4f014e1ba7fa71172d7442b83.tar.bz2
frost-b10a745c7f0f46f4f014e1ba7fa71172d7442b83.zip
Dev-1.1.7 (#39) - feature overload + context menuv1.2
* Address some crashlytics issues * Add text scaling * Kau fixes and cleanup * WIP formatter * Create in house url formatter * Update context menu * Update themes * Test proguard without R * Implement sharing and clean up context menu * Disable viewpager swipe on long press * Test keeping lib strings * Update changelog and proguard
Diffstat (limited to 'app/src/main/assets/js/context_a.min.js')
-rw-r--r--app/src/main/assets/js/context_a.min.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/app/src/main/assets/js/context_a.min.js b/app/src/main/assets/js/context_a.min.js
index dc68cb3b..82f89e8b 100644
--- a/app/src/main/assets/js/context_a.min.js
+++ b/app/src/main/assets/js/context_a.min.js
@@ -1,15 +1,20 @@
if(!window.hasOwnProperty("frost_context_a")){
console.log("frost_context_a frost_click_a"),
window.frost_context_a=!0
-;var _frostAContext=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 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
-;console.log("Context Intercept",o),Frost.contextMenu(o),
+;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("contextmenu",_frostAContext,!0),document.addEventListener("touchend",function(t){
+longClick&&(Frost.longClick(!1),
+longClick=!1)
+},!0)
} \ No newline at end of file