14 lines
437 B
TypeScript
14 lines
437 B
TypeScript
// Copyright 2021 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
{
|
|
const updateFullScreenClass = (
|
|
isFullScreen: boolean,
|
|
isMaximized: boolean
|
|
) => {
|
|
document.body.classList.toggle('full-screen', isFullScreen);
|
|
document.body.classList.toggle('maximized', isMaximized);
|
|
};
|
|
updateFullScreenClass(window.isFullScreen(), window.isMaximized());
|
|
window.onFullScreenChange = updateFullScreenClass;
|
|
}
|