diff options
| author | Stephen Blott | 2017-11-02 12:33:18 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-02 12:33:18 +0000 |
| commit | fd3ea96dfe365b7b049504073de6c0da4c08b050 (patch) | |
| tree | 1855ed336375e0301a8035a2a3bb7c8b8b7d26b8 | |
| parent | 574729275e92f084660ef9b4ac52512cb4882d31 (diff) | |
| parent | 352ebd78194816d9b3be91724ac681e3a5f2f812 (diff) | |
| download | vimium-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.coffee | 9 |
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. |
