diff options
| author | Stephen Blott | 2015-06-03 19:13:17 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-06-03 19:13:17 +0100 |
| commit | 457a976421107f9a67ac43090b0370366427bce1 (patch) | |
| tree | 4ac8f015cdcf47a9e1fb827693b3fef3f8a159ac | |
| parent | 6720f4c5a511e5e7b39e6a59e989353f7fb09792 (diff) | |
| download | vimium-457a976421107f9a67ac43090b0370366427bce1.tar.bz2 | |
Add mark commands to README, more simple refactoring.
| -rw-r--r-- | content_scripts/marks.coffee | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/content_scripts/marks.coffee b/content_scripts/marks.coffee index 73c019da..971feadf 100644 --- a/content_scripts/marks.coffee +++ b/content_scripts/marks.coffee @@ -54,16 +54,15 @@ Marks = indicator: "Go to mark..." suppressAllKeyboardEvents: true keypress: (event) => - keyChar = String.fromCharCode event.charCode - if event.shiftKey - @exit -> + @exit => + keyChar = String.fromCharCode event.charCode + if event.shiftKey chrome.runtime.sendMessage handler: 'gotoMark' markName: keyChar - else - markString = - if keyChar == previousPositionKey then @previousPosition else localStorage[@getLocationKey keyChar] - @exit => + else + markString = + if keyChar == previousPositionKey then @previousPosition else localStorage[@getLocationKey keyChar] if markString? @setPreviousPosition() position = JSON.parse markString |
