aboutsummaryrefslogtreecommitdiff
path: root/assets/menu-reset.js
blob: 37cb47be1e975d055da7206c8f7ef8bbfd90b2f9 (plain)
1
2
3
4
5
6
7
(function() {
  var menu = document.querySelector("aside .book-menu-content");
  addEventListener("beforeunload", function(event) {
      localStorage.setItem("menu.scrollTop", menu.scrollTop);
  });
  menu.scrollTop = localStorage.getItem("menu.scrollTop");
})();