From d2b14cbe04acf1e03f988aa3ef8deb78c0480782 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 27 Mar 2016 06:22:14 +0100 Subject: Better test for scrollability. Testing the `scrollHeight` is cheaper than testing scrollability. There are a lot of non-scrollabile divs, so it makes sense to use this cheaper test as a filter. --- 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 ced90cc5..1795f0f7 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -262,7 +262,7 @@ LocalHints = reason = "Frame." when "div", "ol", "ul" isClickable ||= - if Scroller.isScrollableElement element + if element.clientHeight < element.scrollHeight and Scroller.isScrollableElement element reason = "Scroll." # An element with a class name containing the text "button" might be clickable. However, real clickables -- cgit v1.2.3