# Cookbook | Docs
Canonical: https://social-archive.org/arc/GENzgw5Nb4
Original URL: https://developer.nylas.com/docs/cookbook/
Author: Nylas
Platform: web
Share mode: full
## Content
<script> (() => { try { if (!matchMedia('(min-width: 50em)').matches) return; /** @type {HTMLElement | null} */ const target = document.querySelector('sl-sidebar-state-persist'); const state = JSON.parse(sessionStorage.getItem('sl-sidebar-state') || '0'); if (!target ||!state || target.dataset.hash!== state.hash) return; window._starlightScrollRestore = state.scroll; customElements.define( 'sl-sidebar-restore', class SidebarRestore extends HTMLElement { connectedCallback() { try { const idx = parseInt(this.dataset.index || ''); const details = this.closest('details'); if (details && typeof state.open[idx] === 'boolean') details.open = state.open[idx]; } catch {} } } ); } catch {} })(); </script>
## Media
1. image: https://social-archiver-api.social-archive.org/media/archives/arc/AIGpy8C6KI/media/0.png
