Defer loading of js code on landing pages

So that DOM tree can be processed earlier.
This commit is contained in:
Chocobo1 2024-02-12 14:23:35 +08:00
parent 67e0a2de44
commit a9741bb203
2 changed files with 17 additions and 17 deletions

View File

@ -18,22 +18,22 @@
<noscript>
<link rel="stylesheet" type="text/css" href="css/noscript.css?v=${CACHEID}" />
</noscript>
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/mocha.min.js"></script>
<script src="scripts/cache.js?v=${CACHEID}"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/mocha-init.js?locale=${LANG}&v=${CACHEID}"></script>
<script src="scripts/lib/clipboard.min.js"></script>
<script src="scripts/filesystem.js?v=${CACHEID}"></script>
<script src="scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
<script src="scripts/progressbar.js?v=${CACHEID}"></script>
<script src="scripts/piecesbar.js?v=${CACHEID}"></script>
<script src="scripts/file-tree.js?v=${CACHEID}"></script>
<script src="scripts/dynamicTable.js?locale=${LANG}&v=${CACHEID}"></script>
<script src="scripts/rename-files.js?v=${CACHEID}"></script>
<script src="scripts/client.js?locale=${LANG}&v=${CACHEID}"></script>
<script src="scripts/contextmenu.js?locale=${LANG}&v=${CACHEID}"></script>
<script defer src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script defer src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script defer src="scripts/lib/mocha.min.js"></script>
<script defer src="scripts/cache.js?v=${CACHEID}"></script>
<script defer src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script defer src="scripts/mocha-init.js?locale=${LANG}&v=${CACHEID}"></script>
<script defer src="scripts/lib/clipboard.min.js"></script>
<script defer src="scripts/filesystem.js?v=${CACHEID}"></script>
<script defer src="scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
<script defer src="scripts/progressbar.js?v=${CACHEID}"></script>
<script defer src="scripts/piecesbar.js?v=${CACHEID}"></script>
<script defer src="scripts/file-tree.js?v=${CACHEID}"></script>
<script defer src="scripts/dynamicTable.js?locale=${LANG}&v=${CACHEID}"></script>
<script defer src="scripts/rename-files.js?v=${CACHEID}"></script>
<script defer src="scripts/client.js?locale=${LANG}&v=${CACHEID}"></script>
<script defer src="scripts/contextmenu.js?locale=${LANG}&v=${CACHEID}"></script>
</head>
<body>

View File

@ -11,7 +11,7 @@
<noscript>
<link rel="stylesheet" type="text/css" href="css/noscript.css?v=${CACHEID}" />
</noscript>
<script src="scripts/login.js?locale=${LANG}&v=${CACHEID}"></script>
<script defer src="scripts/login.js?locale=${LANG}&v=${CACHEID}"></script>
</head>
<body>