diff options
| -rw-r--r-- | content_scripts/mode_normal.coffee | 13 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 13 | 
2 files changed, 13 insertions, 13 deletions
| diff --git a/content_scripts/mode_normal.coffee b/content_scripts/mode_normal.coffee index 6ae82fe6..9a53ce76 100644 --- a/content_scripts/mode_normal.coffee +++ b/content_scripts/mode_normal.coffee @@ -33,6 +33,13 @@ class NormalMode extends KeyHandlerMode      else        Utils.invokeCommandString registryEntry.command, count, {registryEntry} +enterNormalMode = (count) -> +  new NormalMode +    indicator: "Normal mode (pass keys disabled)" +    exitOnEscape: true +    singleton: "enterNormalMode" +    count: count +  NormalModeCommands =    # Scrolling.    scrollToBottom: -> @@ -112,6 +119,12 @@ NormalModeCommands =    mainFrame: -> focusThisFrame highlight: true, forceFocusThisFrame: true    showHelp: (sourceFrameId) -> HelpDialog.toggle {sourceFrameId, showAllCommandDetails: false} +  passNextKey: (count, options) -> +    if options.registryEntry.options.normal +      enterNormalMode count +    else +      new PassNextKeyMode count +  root = exports ? (window.root ?= {})  root.NormalMode = NormalMode  root.NormalModeCommands = NormalModeCommands diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 0cc9e15f..10eb197b 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -299,19 +299,6 @@ focusThisFrame = (request) ->    flashFrame() if request.highlight  extend root, -  passNextKey: (count, options) -> -    if options.registryEntry.options.normal -      enterNormalMode count -    else -      new PassNextKeyMode count - -  enterNormalMode: (count) -> -    new NormalMode -      indicator: "Normal mode (pass keys disabled)" -      exitOnEscape: true -      singleton: "enterNormalMode" -      count: count -    focusInput: do ->      # Track the most recently focused input element.      recentlyFocusedElement = null | 
