aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode_normal.coffee
diff options
context:
space:
mode:
authormrmr19932017-10-25 01:04:58 +0100
committermrmr19932017-10-27 20:36:07 +0100
commit6cb8a82b7cf7d6930b669fae74e1751a1e87567d (patch)
tree6e6bb3f56920aea7a1d046a4dafe5a9687f8d226 /content_scripts/mode_normal.coffee
parentb06ed7bd5cc82ec3307aeee945bcf6bf8f9264ce (diff)
downloadvimium-6cb8a82b7cf7d6930b669fae74e1751a1e87567d.tar.bz2
Move goPrevious and goNext to normal mode file
Diffstat (limited to 'content_scripts/mode_normal.coffee')
-rw-r--r--content_scripts/mode_normal.coffee10
1 files changed, 10 insertions, 0 deletions
diff --git a/content_scripts/mode_normal.coffee b/content_scripts/mode_normal.coffee
index 3ddbf294..8547c9e5 100644
--- a/content_scripts/mode_normal.coffee
+++ b/content_scripts/mode_normal.coffee
@@ -125,6 +125,16 @@ NormalModeCommands =
else
new PassNextKeyMode count
+ goPrevious: ->
+ previousPatterns = Settings.get("previousPatterns") || ""
+ previousStrings = previousPatterns.split(",").filter( (s) -> s.trim().length )
+ findAndFollowRel("prev") || findAndFollowLink(previousStrings)
+
+ goNext: ->
+ nextPatterns = Settings.get("nextPatterns") || ""
+ nextStrings = nextPatterns.split(",").filter( (s) -> s.trim().length )
+ findAndFollowRel("next") || findAndFollowLink(nextStrings)
+
focusInput: (count) ->
# Focus the first input element on the page, and create overlays to highlight all the input elements, with
# the currently-focused element highlighted specially. Tabbing will shift focus to the next input element.