Preload fonts, load scripts after body

This commit is contained in:
Fedor Indutny 2022-05-31 14:42:18 -07:00 committed by GitHub
parent 8b9543aa67
commit a88560183b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 59 deletions

View file

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