diff options
| author | mrmr1993 | 2017-10-24 19:34:20 +0100 |
|---|---|---|
| committer | mrmr1993 | 2017-10-27 20:34:59 +0100 |
| commit | ee95cb38bbd24fec444e0af3f593f470cce60d22 (patch) | |
| tree | 2ff33aeeea9149e1c07dd125dd5bc5a408d4654b | |
| parent | 6fcfde0b561e43955ef35ea3a91ed483cedfff4f (diff) | |
| download | vimium-ee95cb38bbd24fec444e0af3f593f470cce60d22.tar.bz2 | |
Move mainFrame and showHelp to normal mode file
| -rw-r--r-- | content_scripts/mode_normal.coffee | 4 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/content_scripts/mode_normal.coffee b/content_scripts/mode_normal.coffee index 652adc3c..6ae82fe6 100644 --- a/content_scripts/mode_normal.coffee +++ b/content_scripts/mode_normal.coffee @@ -108,6 +108,10 @@ NormalModeCommands = performFind: (count) -> FindMode.findNext false for [0...count] by 1 performBackwardsFind: (count) -> FindMode.findNext true for [0...count] by 1 + # Misc. + mainFrame: -> focusThisFrame highlight: true, forceFocusThisFrame: true + showHelp: (sourceFrameId) -> HelpDialog.toggle {sourceFrameId, showAllCommandDetails: false} + 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 e5de01a3..0cc9e15f 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -299,8 +299,6 @@ focusThisFrame = (request) -> flashFrame() if request.highlight extend root, - mainFrame: -> focusThisFrame highlight: true, forceFocusThisFrame: true - passNextKey: (count, options) -> if options.registryEntry.options.normal enterNormalMode count @@ -540,9 +538,6 @@ root.goNext = -> nextStrings = nextPatterns.split(",").filter( (s) -> s.trim().length ) findAndFollowRel("next") || findAndFollowLink(nextStrings) -root.showHelp = (sourceFrameId) -> - HelpDialog.toggle {sourceFrameId, showAllCommandDetails: false} - # If we are in the help dialog iframe, then HelpDialog is already defined with the necessary functions. root.HelpDialog ?= helpUI: null |
