From 4047dd4944adf8694521b30170791af3ff42f712 Mon Sep 17 00:00:00 2001
From: repfuel <38471793+repfuel@users.noreply.github.com>
Date: Sun, 5 Nov 2023 01:23:29 +0100
Subject: [PATCH] Formatting
---
js/boot.js | 104 ++++++++++++++++++++++++++---------------------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/js/boot.js b/js/boot.js
index 82e93e9..863c271 100644
--- a/js/boot.js
+++ b/js/boot.js
@@ -1,61 +1,61 @@
$(document).ready(function() {
- $(".command").hide();
-// Boot-up sequence
-const bootUpSequence = [
- "WINDOSE BIOS @ " + new Date().toLocaleString() + "
Booting up the system...",
- "Initializing hardware...",
- "Checking memory...",
- "Checking disks...",
- "Mounting file systems...",
- "Loading drivers...",
- "Starting services...",
- "Booting complete."
-];
+ $(".command").hide();
+ // Boot-up sequence
+ const bootUpSequence = [
+ "WINDOSE BIOS @ " + new Date().toLocaleString() + "
Booting up the system...",
+ "Initializing hardware...",
+ "Checking memory...",
+ "Checking disks...",
+ "Mounting file systems...",
+ "Loading drivers...",
+ "Starting services...",
+ "Booting complete."
+ ];
-// Display boot-up sequence
-function displayBootUpSequence(index) {
- if (index < bootUpSequence.length - 1) {
- let outputText = "
" + bootUpSequence[index] + "/-
";
- let outputElement = $(outputText).appendTo(".terminal");
- animateLoading(outputElement.find(".loading"));
- setTimeout(function() {
- displayBootUpSequence(index + 1);
- }, 2000);
- } else {
- // Handle click outside of prompt box
-$(".terminal").click(function() {
- $(".command").focus();
-});
-$(".command").show();
- const script = document.createElement('script');
- script.src = './js/script.js';
- document.head.appendChild(script);
- // Remove boot-up sequence
- $(".output").remove();
- }
-}
-// Animate loading element
-function animateLoading(element) {
- let animationIndex = 0;
- let animationFrames = ["/", "-", "\\", "|"];
- let intervalId = setInterval(function() {
- element.text(animationFrames[animationIndex]);
- animationIndex = (animationIndex + 1) % animationFrames.length;
- }, 100);
- setTimeout(function() {
- clearInterval(intervalId);
- element.text("OK");
- }, 2000);
+ // Display boot-up sequence
+ function displayBootUpSequence(index) {
+ if (index < bootUpSequence.length - 1) {
+ let outputText = "" + bootUpSequence[index] + "/-
";
+ let outputElement = $(outputText).appendTo(".terminal");
+ animateLoading(outputElement.find(".loading"));
+ setTimeout(function() {
+ displayBootUpSequence(index + 1);
+ }, 2000);
+ } else {
+ // Handle click outside of prompt box
+ $(".terminal").click(function() {
+ $(".command").focus();
+ });
+ $(".command").show();
+ const script = document.createElement('script');
+ script.src = './js/script.js';
+ document.head.appendChild(script);
+ // Remove boot-up sequence
+ $(".output").remove();
+ }
+ }
+ // Animate loading element
+ function animateLoading(element) {
+ let animationIndex = 0;
+ let animationFrames = ["/", "-", "\\", "|"];
+ let intervalId = setInterval(function() {
+ element.text(animationFrames[animationIndex]);
+ animationIndex = (animationIndex + 1) % animationFrames.length;
+ }, 100);
+ setTimeout(function() {
+ clearInterval(intervalId);
+ element.text("OK");
+ }, 2000);
}
-displayBootUpSequence(0);
+ displayBootUpSequence(0);
-// Hide mouse cursor
-$(".terminal").css("cursor", "none");
-$(".terminal").css("overflow", "hidden");
-document.documentElement.style.overflow = "hidden";
-document.body.style.overflow = "hidden";
+ // Hide mouse cursor
+ $(".terminal").css("cursor", "none");
+ $(".terminal").css("overflow", "hidden");
+ document.documentElement.style.overflow = "hidden";
+ document.body.style.overflow = "hidden";
});