diff options
| author | mrmr1993 | 2017-10-24 19:51:25 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2017-10-27 20:34:59 +0100 | 
| commit | fe2255f4de5e17d6ab1a9168191bfbfaa488d62d (patch) | |
| tree | 257f29d9705befa93b599e5701a9315a3307f077 /content_scripts | |
| parent | ee95cb38bbd24fec444e0af3f593f470cce60d22 (diff) | |
| download | vimium-fe2255f4de5e17d6ab1a9168191bfbfaa488d62d.tar.bz2 | |
Move passNextKey to normal mode file
Diffstat (limited to 'content_scripts')
| -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 | 
