From 03e010f0aeb835778664438549f168ccae297d7c Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 2 Apr 2016 08:48:00 +0100 Subject: Move the test for small windows to DomUtils. The reason for doing this is that we will be using the same test to decide whether or not to register a frame. --- content_scripts/vimium_frontend.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index b1e82a75..fb8742e0 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -264,7 +264,7 @@ DomUtils.documentReady -> # focusThisFrame = (request) -> unless request.forceFocusThisFrame - if window.innerWidth < 3 or window.innerHeight < 3 or document.body?.tagName.toLowerCase() == "frameset" + if DomUtils.windowIsTooSmall() or document.body?.tagName.toLowerCase() == "frameset" # This frame is too small to focus or it's a frameset. Cancel and tell the background page to focus the # next frame instead. This affects sites like Google Inbox, which have many tiny iframes. See #1317. chrome.runtime.sendMessage handler: "nextFrame" -- cgit v1.2.3