Window controls

Purpose: Make Bubblegum's windows behave like windows: collapse to a title bar, show which window is in use, and on desktop drag them around and put them back. Scenario: With FORUM_DRAGGABLE_WINDOWS_ENABLED on, a reader picks Bubblegum. Every .card gets a title bar with a collapse button. They collapse a long post; it shrinks to a bar showing its author, and after a reload it is collapsed from the first frame. Clicking or tabbing into a window makes it active and fades the other bars. On a desktop they press Float in the corner bar, drag a window by its title bar, and press Reset to put everything back. Picking Gloss removes every button, mark and position without a reload. In Preferences, Window controls Off does the same and keeps it off in this browser. Sources: Bubblegum script (source unavailable), title bar and collapsed styles (source unavailable), before-paint restore (source unavailable) (data-window-controls, #window-controls-collapsed), storage keys (source unavailable) (windowControlsStorageKey, collapsedWindowsStorageKey), flag (source unavailable), script gate (source unavailable), Preferences row (source unavailable) and its saving (source unavailable), browser test (source unavailable).

Built on theme script: Bubblegum's script registers start and stop, and theme_toggle.js loads it only while the flag is on. Only posts remember being collapsed, by data-post-id (the newest 500); other windows reset on reload. Float positions live only in the page. Touch and narrow screens never see Float. With JavaScript off, or the flag off, Bubblegum is the still picture it was before.