Add a comment to the top of the javascript.

This commit is contained in:
Robin Malley 2021-10-11 00:54:47 +00:00
parent 1487835478
commit 296777d3fc
1 changed files with 4 additions and 1 deletions

View File

@ -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)
}