Checking Visibility of Bars

Six BarProp objects hang off window: locationbar, menubar, personalbar, scrollbars, statusbar and toolbar. Their read-only visible Boolean once reported whether that toolbar was showing. "For privacy and interoperability reasons", the HTML Standard now makes all six return false when the top-level window was opened as a popup and true otherwise, so the only remaining use is a popup check: if (!menubar.visible) document.body.classList.add('compact').