From e79537231f35215339c04d1e01347974bd4bd810 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Mon, 22 Dec 2014 12:33:14 +0000 Subject: Correct a typo, add some tests for consistency --- lib/dom_utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 8bb099a1..2447b4bb 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -59,7 +59,7 @@ DomUtils = continue if (computedStyle.getPropertyValue('float') == 'none' && computedStyle.getPropertyValue('position') != 'absolute') childClientRect = @getVisibleClientRect(child) - continue if clientRect == null + continue if childClientRect == null or childClientRect.width < 3 or childClientRect.height < 3 return childClientRect else -- cgit v1.2.3 From c1ffbc88ed1e340a7a046e1d75499642bf220e7f Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Mon, 22 Dec 2014 12:35:13 +0000 Subject: Prefer `||=` to `= true if` --- content_scripts/link_hints.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index c4bf3f96..df442ea6 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -169,7 +169,7 @@ LinkHints = jsactionRules = element.getAttribute("jsaction").split(";") for jsactionRule in jsactionRules ruleSplit = jsactionRule.split ":" - isClickable = true if ruleSplit[0] == "click" or (ruleSplit.length == 1 and ruleSplit[0] != "none") + isClickable ||= ruleSplit[0] == "click" or (ruleSplit.length == 1 and ruleSplit[0] != "none") # Check for tagNames which are natively clickable. switch tagName -- cgit v1.2.3