UNPKG

starlight-fullview-mode

Version:

A minimalist plugin that collapses Starlight's sidebars and expands the main content to full width, creating a distraction-free, fullscreen-like reading experience. Toggle with a single click to focus purely on your content.

17 lines (14 loc) 499 B
export const parseSvgPath = (svgString:string) => { if (!svgString) return null; // Extract path data using regex match const match = svgString.match(/ d="([^"]*)"/); return match ? match[1] : null; }; export let documentQuerySelector = (selector:string) => { return document.querySelector(selector) as HTMLElement; }; export let documentQuerySelectorAll = (selector:string) => { return Array.from( document.querySelectorAll(selector) ) as Array<HTMLElement>; };