From 15d094675c4e354becf58b5f66754dd939d5daeb Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Mon, 22 Dec 2014 11:54:49 +0000 Subject: Rename a poorly named variable --- content_scripts/link_hints.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 9eb7b87c..616d40ee 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -149,8 +149,8 @@ LinkHints = map = document.querySelector "map[name=\"#{mapName}\"]" if map and imgClientRects.length > 0 areas = map.getElementsByTagName "area" - areaRects = DomUtils.getClientRectsForAreas imgClientRects[0], areas - visibleElements = visibleElements.concat areaRects + areasAndRects = DomUtils.getClientRectsForAreas imgClientRects[0], areas + visibleElements = visibleElements.concat areasAndRects # Check aria properties to see if the element should be ignored. if (element.getAttribute("aria-hidden")?.toLowerCase() in ["", "true"] or -- cgit v1.2.3 From 76af56da84753163adc4dbf943374a10f0cb8321 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Mon, 22 Dec 2014 11:56:18 +0000 Subject: Use push with a splat rather than concat --- content_scripts/link_hints.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 616d40ee..c4bf3f96 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -150,7 +150,7 @@ LinkHints = if map and imgClientRects.length > 0 areas = map.getElementsByTagName "area" areasAndRects = DomUtils.getClientRectsForAreas imgClientRects[0], areas - visibleElements = visibleElements.concat areasAndRects + visibleElements.push areasAndRects... # Check aria properties to see if the element should be ignored. if (element.getAttribute("aria-hidden")?.toLowerCase() in ["", "true"] or -- cgit v1.2.3