aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/link_hints.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index a5be6c57..3cebac4c 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -64,8 +64,8 @@ LinkHints =
# When using text filtering, we sort the elements such that we visit descendants before their ancestors.
# This allows us to exclude the text used for matching descendants from that used for matching their
# ancestors.
- textLength = (el) -> el.element.textContent?.length ? 0
- elements.sort (a,b) -> textLength(a) - textLength b
+ length = (el) -> el.element.innerHTML?.length ? 0
+ elements.sort (a,b) -> length(a) - length b
hintMarkers = (@createMarkerFor(el) for el in elements)
@getMarkerMatcher().fillInMarkers(hintMarkers)