From 296777d3fc8b0f960e4f3a32ee26848efbbc3bef Mon Sep 17 00:00:00 2001 From: Robin Malley Date: Mon, 11 Oct 2021 00:54:47 +0000 Subject: [PATCH] Add a comment to the top of the javascript. --- assets/bookmark.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) }