Preload fonts, load scripts after body
This commit is contained in:
parent
8b9543aa67
commit
a88560183b
5 changed files with 61 additions and 59 deletions
|
@ -38,6 +38,43 @@
|
||||||
type="text/css"
|
type="text/css"
|
||||||
/>
|
/>
|
||||||
<link href="stylesheets/manifest.css" rel="stylesheet" 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
|
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 }}
|
{{ #summary }} <div class='summary'>{{ summary }}</div>{{ /summary }}
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</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="js/components.js"></script>
|
||||||
<script type="text/javascript" src="ts/set_os_class.js"></script>
|
<script type="text/javascript" src="ts/set_os_class.js"></script>
|
||||||
|
@ -99,7 +153,6 @@
|
||||||
></script>
|
></script>
|
||||||
<script type="text/javascript" src="ts/backboneJquery.js"></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/reliable_trigger.js"></script>
|
||||||
<script type="text/javascript" src="js/database.js"></script>
|
|
||||||
|
|
||||||
<script
|
<script
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
|
@ -122,25 +175,6 @@
|
||||||
src="ts/shims/showConfirmationDialog.js"
|
src="ts/shims/showConfirmationDialog.js"
|
||||||
></script>
|
></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
|
Note: this inline script cannot be changed without also changing the hash in
|
||||||
the CSP at the top of this file
|
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
|
// We add a this parameter to avoid an 'implicit any' error on the next line
|
||||||
const EventsMixin = function EventsMixin(this: unknown) {
|
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
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
} as any as typeof window.Backbone.EventsMixin;
|
} as any as typeof window.Backbone.EventsMixin;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Copyright 2021 Signal Messenger, LLC
|
// Copyright 2021 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
$(document).ready(() => {
|
{
|
||||||
const updateFullScreenClass = (isFullScreen: boolean) => {
|
const updateFullScreenClass = (isFullScreen: boolean) => {
|
||||||
$(document.body).toggleClass('full-screen', isFullScreen);
|
document.body.classList.toggle('full-screen', isFullScreen);
|
||||||
};
|
};
|
||||||
updateFullScreenClass(window.isFullScreen());
|
updateFullScreenClass(window.isFullScreen());
|
||||||
window.onFullScreenChange = updateFullScreenClass;
|
window.onFullScreenChange = updateFullScreenClass;
|
||||||
});
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2021 Signal Messenger, LLC
|
// Copyright 2021 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
$(document).ready(() => {
|
{
|
||||||
let className: string;
|
let className: string;
|
||||||
if (window.Signal.OS.isWindows()) {
|
if (window.Signal.OS.isWindows()) {
|
||||||
className = 'os-windows';
|
className = 'os-windows';
|
||||||
|
@ -13,5 +13,5 @@ $(document).ready(() => {
|
||||||
throw new Error('Unexpected operating system; not applying ');
|
throw new Error('Unexpected operating system; not applying ');
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document.body).addClass(className);
|
document.body.classList.add(className);
|
||||||
});
|
}
|
||||||
|
|
|
@ -7928,22 +7928,6 @@
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2020-12-17T18:08:07.752Z"
|
"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",
|
"rule": "DOM-innerHTML",
|
||||||
"path": "ts/quill/signal-clipboard/index.ts",
|
"path": "ts/quill/signal-clipboard/index.ts",
|
||||||
|
@ -7952,22 +7936,6 @@
|
||||||
"updated": "2020-11-06T17:43:07.381Z",
|
"updated": "2020-11-06T17:43:07.381Z",
|
||||||
"reasonDetail": "used for figuring out clipboard contents"
|
"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(",
|
"rule": "jQuery-load(",
|
||||||
"path": "ts/state/ducks/app.ts",
|
"path": "ts/state/ducks/app.ts",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue