diff options
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/marks.coffee | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/content_scripts/marks.coffee b/content_scripts/marks.coffee index 3b5814da..f569e1ea 100644 --- a/content_scripts/marks.coffee +++ b/content_scripts/marks.coffee @@ -36,11 +36,14 @@ Marks = # characters. @exit => if event.shiftKey + # We record the current scroll position, but only if this is the top frame within the tab. + # Otherwise, we'll fetch the scroll position of the top frame from the background page later. + [ scrollX, scrollY ] = [ window.scrollX, window.scrollY ] if DomUtils.isTopFrame() chrome.runtime.sendMessage handler: 'createMark' markName: keyChar - scrollX: window.scrollX - scrollY: window.scrollY + scrollX: scrollX + scrollY: scrollY , => @showMessage "Created global mark", keyChar else localStorage[@getLocationKey keyChar] = @getMarkString() |
