// Populate the sidebar // // This is a script, and not included directly in the page, to control the total size of the book. // The TOC contains an entry for each page, so if each page includes a copy of the TOC, // the total size of the page becomes O(n**2). class MDBookSidebarScrollbox extends HTMLElement { constructor() { super(); } connectedCallback() { this.innerHTML = '
  1. Today
  2. 2025-08
  3. 08-03-日刊
  4. 08-02-日刊
  5. 08-01-日刊
  6. 2025-07
  7. 07-31-日刊
  8. 07-30-日刊
  9. 07-29-日刊
  10. 07-28-日刊
  11. 07-27-日刊
  12. 07-26-日刊
  13. 07-25-日刊
  14. 07-24-日刊
  15. 07-23-日刊
  16. 07-22-日刊
  17. 07-21-日刊
  18. 07-20-日刊
  19. 07-19-日刊
  20. 07-18-日刊
  21. 07-17-日刊
  22. 07-16-日刊
  23. 07-15-日刊
  24. 07-14-日刊
  25. 07-13-日刊
  26. 07-12-日刊
  27. 07-11-日刊
  28. 07-10-日刊
  29. 07-09-日刊
  30. 07-08-日刊
  31. 07-07-日刊
  32. 07-06-日刊
  33. 07-05-日刊
  34. 07-04-日刊
  35. 07-03-日刊
  36. 07-02-日刊
  37. 07-01-日刊
  38. 2025-06
  39. 06-30-日刊
  40. 06-29-日刊
  41. 06-28-日刊
  42. 06-27-日刊
  43. 06-26-日刊
  44. 06-25-日刊
  45. 06-24-日刊
  46. 06-23-日刊
  47. 06-22-日刊
  48. 06-21-日刊
  49. 06-20-日刊
  50. 06-19-日刊
  51. 06-18-日刊
  52. 06-17-日刊
  53. 06-16-日刊
  54. 06-15-日刊
  55. 06-14-日刊
  56. 06-13-日刊
  57. 06-12-日刊
  58. 06-11-日刊
  59. 06-10-日刊
  60. 06-09-日刊
  61. 06-08-日刊
  62. 06-07-日刊
  63. 06-06-日刊
  64. 06-05-日刊
  65. 06-04-日刊
  66. 06-03-日刊
  67. 06-02-日刊
  68. 06-01-日刊
'; // Set the current, active page, and reveal it if it's hidden let current_page = document.location.href.toString().split("#")[0].split("?")[0]; if (current_page.endsWith("/")) { current_page += "index.html"; } var links = Array.prototype.slice.call(this.querySelectorAll("a")); var l = links.length; for (var i = 0; i < l; ++i) { var link = links[i]; var href = link.getAttribute("href"); if (href && !href.startsWith("#") && !/^(?:[a-z+]+:)?\/\//.test(href)) { link.href = path_to_root + href; } // The "index" page is supposed to alias the first chapter in the book. if (link.href === current_page || (i === 0 && path_to_root === "" && current_page.endsWith("/index.html"))) { link.classList.add("active"); var parent = link.parentElement; if (parent && parent.classList.contains("chapter-item")) { parent.classList.add("expanded"); } while (parent) { if (parent.tagName === "LI" && parent.previousElementSibling) { if (parent.previousElementSibling.classList.contains("chapter-item")) { parent.previousElementSibling.classList.add("expanded"); } } parent = parent.parentElement; } } } // Track and set sidebar scroll position this.addEventListener('click', function(e) { if (e.target.tagName === 'A') { sessionStorage.setItem('sidebar-scroll', this.scrollTop); } }, { passive: true }); var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); sessionStorage.removeItem('sidebar-scroll'); if (sidebarScrollTop) { // preserve sidebar scroll position when navigating via links within sidebar this.scrollTop = sidebarScrollTop; } else { // scroll sidebar to current active section when navigating via "next/previous chapter" buttons var activeSection = document.querySelector('#sidebar .active'); if (activeSection) { activeSection.scrollIntoView({ block: 'center' }); } } // Toggle buttons var sidebarAnchorToggles = document.querySelectorAll('#sidebar a.toggle'); function toggleSection(ev) { ev.currentTarget.parentElement.classList.toggle('expanded'); } Array.from(sidebarAnchorToggles).forEach(function (el) { el.addEventListener('click', toggleSection); }); } } window.customElements.define("mdbook-sidebar-scrollbox", MDBookSidebarScrollbox);