aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2017-11-02 12:33:18 +0000
committerGitHub2017-11-02 12:33:18 +0000
commitfd3ea96dfe365b7b049504073de6c0da4c08b050 (patch)
tree1855ed336375e0301a8035a2a3bb7c8b8b7d26b8
parent574729275e92f084660ef9b4ac52512cb4882d31 (diff)
parent352ebd78194816d9b3be91724ac681e3a5f2f812 (diff)
downloadvimium-fd3ea96dfe365b7b049504073de6c0da4c08b050.tar.bz2
Merge pull request #2762 from mrmr1993/gmail-roles
Add some roles used by GMail to link hints
-rw-r--r--content_scripts/link_hints.coffee9
1 files changed, 6 insertions, 3 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index ea256377..89cf29f1 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -658,9 +658,12 @@ LocalHints =
isClickable ||= @checkForAngularJs element
# Check for attributes that make an element clickable regardless of its tagName.
- if (element.hasAttribute("onclick") or
- element.getAttribute("role")?.toLowerCase() in ["button" , "tab" , "link"] or
- element.getAttribute("contentEditable")?.toLowerCase() in ["", "contentEditable", "true"])
+ if element.hasAttribute("onclick") or
+ (role = element.getAttribute "role") and role.toLowerCase() in [
+ "button" , "tab" , "link", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio"
+ ] or
+ (contentEditable = element.getAttribute "contentEditable") and
+ contentEditable.toLowerCase() in ["", "contentEditable", "true"]
isClickable = true
# Check for jsaction event listeners on the element.