mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Move scripts init at the end of HTML page
This commit is contained in:
@@ -294,6 +294,17 @@ export {
|
||||
renderTemplate,
|
||||
};
|
||||
|
||||
/**
|
||||
* Wait for page to load before continuing the app initialization.
|
||||
*/
|
||||
await new Promise((resolve) => {
|
||||
if (document.readyState === 'complete') {
|
||||
resolve();
|
||||
} else {
|
||||
window.addEventListener('load', resolve);
|
||||
}
|
||||
});
|
||||
|
||||
showLoader();
|
||||
// Yoink preloader entirely; it only exists to cover up unstyled content while loading JS
|
||||
document.getElementById('preloader').remove();
|
||||
|
Reference in New Issue
Block a user