Files
youtube-generator/src/utils/scrollbars.ts
T
poli0981andClaude Opus 5.5 c46c7a4588 feat(settings): option to hide scrollbars
Settings › Appearance › Hide scrollbars removes every scrollbar in the
app; the mouse wheel, touchpad, touch and keyboard still scroll.

- hideScrollbars setting (default off), coerced to a boolean by
  healSettings; portable like the theme, no store version bump (the heal
  back-fills it, and older builds can still read newer backups)
- applied as <html class="hide-scrollbars">: theme-init.js before first
  paint, main.tsx at boot, an App store subscription afterwards (the
  toggle, a restored backup and its undo)
- unlayered CSS beats .scrollbar-thin: scrollbar-width: none on every
  element for Chromium and Firefox, ::-webkit-scrollbar for the WebKit
  webviews on macOS and Linux
- labels in 8 locales

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:13:48 +07:00

10 lines
448 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Settings › Appearance › Hide scrollbars (v1.1.0). A class on <html> that
* globals.css turns into `scrollbar-width: none` everywhere; scrolling itself
* is untouched. public/theme-init.js sets the same class before first paint —
* it cannot import this module, so keep the name in step there.
*/
export function applyHideScrollbars(hidden: boolean): void {
document.documentElement.classList.toggle("hide-scrollbars", hidden);
}