signal-desktop/ts/manage_full_screen_class.ts

11 lines
319 B
TypeScript
Raw Normal View History

2021-02-01 20:01:25 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2022-05-31 21:42:18 +00:00
{
2021-02-01 20:01:25 +00:00
const updateFullScreenClass = (isFullScreen: boolean) => {
2022-05-31 21:42:18 +00:00
document.body.classList.toggle('full-screen', isFullScreen);
2021-02-01 20:01:25 +00:00
};
updateFullScreenClass(window.isFullScreen());
window.onFullScreenChange = updateFullScreenClass;
2022-05-31 21:42:18 +00:00
}