aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/link_hints.coffee
diff options
context:
space:
mode:
authormrmr19932014-12-18 15:08:59 +0000
committermrmr19932014-12-18 15:08:59 +0000
commite56dea52d4e0eead061f676891c04cfc07336194 (patch)
tree8179f65943baf7c4bfc50a2cc614595a6050e4d4 /content_scripts/link_hints.coffee
parentaa047d5b4b6124f7e2d1230ab590b9244db6ebb3 (diff)
downloadvimium-e56dea52d4e0eead061f676891c04cfc07336194.tar.bz2
Add brackets so the code compiles as expected
Diffstat (limited to 'content_scripts/link_hints.coffee')
-rw-r--r--content_scripts/link_hints.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index b1c44e42..ba1603e4 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -152,9 +152,9 @@ LinkHints =
visibleElements = visibleElements.concat areaRects
# Check for attributes that make an element clickable regardless of its tagName.
- if (element.hasAttribute "onclick" or
- element.hasAttribute "tabindex" or
- element.getAttribute "role" in ["button", "link"] or
+ if (element.hasAttribute("onclick") or
+ element.hasAttribute("tabindex") or
+ element.getAttribute("role")?.toLowerCase() in ["button", "link"] or
element.getAttribute("class")?.toLowerCase().indexOf("button") >= 0 or
element.getAttribute("contentEditable")?.toLowerCase() in ["", "contentEditable", "true"])
isClickable = true