diff --git a/assets/bookmark.js b/assets/bookmark.js index 8362005..c6084b8 100644 --- a/assets/bookmark.js +++ b/assets/bookmark.js @@ -1,4 +1,7 @@ - +/* +Stores the scroll location on a story to local storage, and re-scroll to the +position next time the page is loaded. +*/ window.onbeforeunload = function(e) { localStorage.setItem(window.location.pathname,window.scrollY) }