From 7ecc65d8215203b89248d8f313783ce48e8ba1c4 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 29 Mar 2016 15:05:52 +0100 Subject: Add tests for WaitForEnter. --- content_scripts/link_hints.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 7dad806f..526e3917 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -286,7 +286,7 @@ class LinkHintsMode clickEl.focus() linkActivator clickEl - installKeyBoardBlocker = (startKeyboardBlocker) -> + installKeyboardBlocker = (startKeyboardBlocker) -> if linkMatched.hintDescriptor.frameId == frameId flashEl = DomUtils.addFlashRect linkMatched.hintDescriptor.rect HintCoordinator.onExit.push -> DomUtils.removeElement flashEl @@ -297,9 +297,9 @@ class LinkHintsMode # If we're using a keyboard blocker, then the frame with the focus sends the "exit" message, otherwise the # frame containing the matched link does. if userMightOverType and Settings.get "waitForEnterForFilteredHints" - installKeyBoardBlocker (callback) -> new WaitForEnter callback + installKeyboardBlocker (callback) -> new WaitForEnter callback else if userMightOverType - installKeyBoardBlocker (callback) -> new TypingProtector 200, callback + installKeyboardBlocker (callback) -> new TypingProtector 200, callback else if linkMatched.hintDescriptor.frameId == frameId DomUtils.flashRect linkMatched.hintDescriptor.rect HintCoordinator.sendMessage "exit", isSuccess: true @@ -750,4 +750,4 @@ root = exports ? window root.LinkHints = LinkHints root.HintCoordinator = HintCoordinator # For tests: -extend root, {LinkHintsMode, LocalHints, AlphabetHints} +extend root, {LinkHintsMode, LocalHints, AlphabetHints, WaitForEnter} -- cgit v1.2.3