create bug.tools

This commit is contained in:
4DBug
2026-02-28 21:33:31 -06:00
commit 91cee9a33a
63 changed files with 2019 additions and 0 deletions

51
js/onLoad.js Normal file
View File

@@ -0,0 +1,51 @@
function newFact() {
const facts = [
'Are you watching me, or am I watching you?',
'Is the self you know, the self that exists?',
'When freedom is lost, what is left?',
'Protect your privacy, embrace your freedom',
'I am a wizard, and this is my realm.',
];
const randomFact = Math.floor(Math.random() * facts.length);
const factDisplayElement = document.getElementById("factDisplay");
if (factDisplayElement) {
factDisplayElement.innerHTML = facts[randomFact];
} else {
console.warn('Element with ID "factDisplay" not found.');
}
}
function initVideoControls() {
const video = document.getElementById("bgVideo");
const btn = document.getElementById("vidBtn");
window.PlayPauseVideo = function PlayPauseVideo() {
if (!video || !btn) return;
if (video.paused) {
video.play();
btn.innerHTML = "TURN OFF";
} else {
video.pause();
btn.innerHTML = "TURN ON";
}
};
}
function applyFadeIn() {
const fadeInElements = document.querySelectorAll(".fade-in");
fadeInElements.forEach((element) => {
requestAnimationFrame(() => {
element.classList.add("visible");
});
});
}
document.addEventListener("DOMContentLoaded", function () {
newFact();
applyFadeIn();
initVideoControls();
});