Preload fonts, load scripts after body
This commit is contained in:
parent
8b9543aa67
commit
a88560183b
|
@ -38,6 +38,43 @@
|
|||
type="text/css"
|
||||
/>
|
||||
<link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" />
|
||||
<link
|
||||
rel="preload"
|
||||
href="fonts/inter-v3.10/Inter-BoldItalic.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="fonts/inter-v3.10/Inter-Bold.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="fonts/inter-v3.10/Inter-SemiBoldItalic.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="fonts/inter-v3.10/Inter-Italic.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="fonts/inter-v3.10/Inter-SemiBold.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="fonts/inter-v3.10/Inter-Regular.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link rel="preload" href="images/signal-logo.svg" as="image" />
|
||||
|
||||
<!--
|
||||
When making changes to these templates, be sure to update test/index.html as well
|
||||
|
@ -90,6 +127,23 @@
|
|||
{{ #summary }} <div class='summary'>{{ summary }}</div>{{ /summary }}
|
||||
</div>
|
||||
</script>
|
||||
</head>
|
||||
<body class="overflow-hidden">
|
||||
<div id="app-container">
|
||||
<div class="app-loading-screen">
|
||||
<div class="module-title-bar-drag-area"></div>
|
||||
|
||||
<div class="content">
|
||||
<div class="module-splash-screen__logo module-img--150"></div>
|
||||
<div class="container">
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
<div class="message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="js/components.js"></script>
|
||||
<script type="text/javascript" src="ts/set_os_class.js"></script>
|
||||
|
@ -99,7 +153,6 @@
|
|||
></script>
|
||||
<script type="text/javascript" src="ts/backboneJquery.js"></script>
|
||||
<script type="text/javascript" src="js/reliable_trigger.js"></script>
|
||||
<script type="text/javascript" src="js/database.js"></script>
|
||||
|
||||
<script
|
||||
type="text/javascript"
|
||||
|
@ -122,25 +175,6 @@
|
|||
src="ts/shims/showConfirmationDialog.js"
|
||||
></script>
|
||||
|
||||
<script type="text/javascript" src="js/wall_clock_listener.js"></script>
|
||||
</head>
|
||||
<body class="overflow-hidden">
|
||||
<div id="app-container">
|
||||
<div class="app-loading-screen">
|
||||
<div class="module-title-bar-drag-area"></div>
|
||||
|
||||
<div class="content">
|
||||
<div class="module-splash-screen__logo module-img--150"></div>
|
||||
<div class="container">
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
<div class="message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
Note: this inline script cannot be changed without also changing the hash in
|
||||
the CSP at the top of this file
|
||||
|
|
|
@ -186,7 +186,7 @@ export function freezeSignedPreKey(
|
|||
|
||||
// We add a this parameter to avoid an 'implicit any' error on the next line
|
||||
const EventsMixin = function EventsMixin(this: unknown) {
|
||||
window._.assign(this, window.Backbone.Events);
|
||||
Object.assign(this, window.Backbone.Events);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any as typeof window.Backbone.EventsMixin;
|
||||
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
$(document).ready(() => {
|
||||
{
|
||||
let className: string;
|
||||
if (window.Signal.OS.isWindows()) {
|
||||
className = 'os-windows';
|
||||
|
@ -13,5 +13,5 @@ $(document).ready(() => {
|
|||
throw new Error('Unexpected operating system; not applying ');
|
||||
}
|
||||
|
||||
$(document.body).addClass(className);
|
||||
});
|
||||
document.body.classList.add(className);
|
||||
}
|
||||
|
|
|
@ -7928,22 +7928,6 @@
|
|||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-12-17T18:08:07.752Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-$(",
|
||||
"path": "ts/manage_full_screen_class.ts",
|
||||
"line": "$(document).ready(() => {",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-01-21T23:06:13.270Z",
|
||||
"reasonDetail": "Doesn't manipulate the DOM."
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-$(",
|
||||
"path": "ts/manage_full_screen_class.ts",
|
||||
"line": " $(document.body).toggleClass('full-screen', isFullScreen);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-01-21T23:06:13.270Z",
|
||||
"reasonDetail": "Manipulates a trusted class."
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "ts/quill/signal-clipboard/index.ts",
|
||||
|
@ -7952,22 +7936,6 @@
|
|||
"updated": "2020-11-06T17:43:07.381Z",
|
||||
"reasonDetail": "used for figuring out clipboard contents"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-$(",
|
||||
"path": "ts/set_os_class.ts",
|
||||
"line": " $(document.body).addClass(className);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-01-21T23:06:13.270Z",
|
||||
"reasonDetail": "Adds a trusted CSS class."
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-$(",
|
||||
"path": "ts/set_os_class.ts",
|
||||
"line": "$(document).ready(() => {",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-01-21T23:06:13.270Z",
|
||||
"reasonDetail": "Doesn't manipulate the DOM."
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-load(",
|
||||
"path": "ts/state/ducks/app.ts",
|
||||
|
|
Loading…
Reference in New Issue