garfieeeeld (add shitty loader)
This commit is contained in:
60
index.html
60
index.html
@@ -1,23 +1,67 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>LAMINAX Windower</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="alwaysLoaded.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>The Laminax OS project needs javascript. Yes even the original terminal version needs it.</noscript>
|
||||
<div id="desktop"></div>
|
||||
<div id="background-layer" class="background-layer-windower"></div>
|
||||
<script src="script.js"></script>
|
||||
<!-- Load the shell -->
|
||||
<script src="shell.js"></script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded",shell.init);
|
||||
function init() {
|
||||
const scripts = [
|
||||
'script.js',
|
||||
'shell.js',
|
||||
'immersion.js'
|
||||
];
|
||||
try {
|
||||
setDisplayURL("/starting")
|
||||
} catch {}
|
||||
scripts.forEach(src => {
|
||||
const script = document.createElement('script');
|
||||
script.src = src;
|
||||
document.body.appendChild(script);
|
||||
if (src === 'script.js') {
|
||||
script.onload = () => {
|
||||
let shouldUpdateLoaderSize = true;
|
||||
const desktopRect = document.getElementById("desktop").getBoundingClientRect();
|
||||
|
||||
// Fake boot screen
|
||||
const loaderWind = createWindow("loader.html", {
|
||||
headerless: true,
|
||||
resizable: false,
|
||||
indent: false
|
||||
});
|
||||
transformWindow(loaderWind.windID, desktopRect.width, desktopRect.height, 0, 0);
|
||||
window.onresize = () => {
|
||||
if (shouldUpdateLoaderSize) {
|
||||
transformWindow(loaderWind.windID, desktopRect.width, desktopRect.height, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(() => {
|
||||
shell.init();
|
||||
shouldUpdateLoaderSize = false;
|
||||
try {
|
||||
setDisplayURL("/localhost")
|
||||
} catch {}
|
||||
killWind(loaderWind.windID); // Close the fake boot screen after 8 seconds
|
||||
}, 8000);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
window.document.addEventListener("DOMContentLoaded", init);
|
||||
</script>
|
||||
<!-- Load OPTIONAL stuff -->
|
||||
<script src="immersion.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user