signal-desktop/ts/manage_full_screen_class.ts
2021-02-01 12:01:25 -08:00

10 lines
343 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
$(document).ready(() => {
const updateFullScreenClass = (isFullScreen: boolean) => {
$(document.body).toggleClass('full-screen', isFullScreen);
};
updateFullScreenClass(window.isFullScreen());
window.onFullScreenChange = updateFullScreenClass;
});