aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/marks.coffee13
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