diff options
| author | Stephen Blott | 2015-06-03 18:57:39 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-06-03 18:57:39 +0100 | 
| commit | 6720f4c5a511e5e7b39e6a59e989353f7fb09792 (patch) | |
| tree | 985969a38fcae37c1a0e5ec1543e07b68f0eed2b | |
| parent | 2251e082b776957f3c3d7476dfd6eefe31d023f1 (diff) | |
| download | vimium-6720f4c5a511e5e7b39e6a59e989353f7fb09792.tar.bz2 | |
Add mark commands to README, simple refactoring.
| -rw-r--r-- | content_scripts/marks.coffee | 24 | 
1 files changed, 11 insertions, 13 deletions
diff --git a/content_scripts/marks.coffee b/content_scripts/marks.coffee index 9c6b1458..73c019da 100644 --- a/content_scripts/marks.coffee +++ b/content_scripts/marks.coffee @@ -31,19 +31,17 @@ Marks =          # If <Shift> is depressed, then it's a global mark, otherwise it's a local mark.  This is consistent          # vim's [A-Z] for global marks, [a-z] for local marks.  However, it also admits other non-Latin          # characters. -        if event.shiftKey -          @exit => -            chrome.runtime.sendMessage -              handler: 'createMark' -              markName: keyChar -              scrollX: window.scrollX -              scrollY: window.scrollY -            , => @showMessage "Created global mark", keyChar -        else -          @exit => -            markString = JSON.stringify scrollX: window.scrollX, scrollY: window.scrollY -            localStorage[@getLocationKey keyChar] = @getMarkString() -            @showMessage "Created local mark", keyChar +        @exit => +          if event.shiftKey +              chrome.runtime.sendMessage +                handler: 'createMark' +                markName: keyChar +                scrollX: window.scrollX +                scrollY: window.scrollY +              , => @showMessage "Created global mark", keyChar +          else +              localStorage[@getLocationKey keyChar] = @getMarkString() +              @showMessage "Created local mark", keyChar    activateGotoMode: (registryEntry) ->      # We pick off the last character of the key sequence used to launch this command. Usually this is just "`".  | 
