From 19b01bff4c251722d4739f6dca208497877f7cbb Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 12 Feb 2024 07:51:32 -0500 Subject: actually kinda try this time --- src/public/js/chrisApp.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/public/js/chrisApp.js (limited to 'src/public/js/chrisApp.js') diff --git a/src/public/js/chrisApp.js b/src/public/js/chrisApp.js deleted file mode 100644 index eb78cfa..0000000 --- a/src/public/js/chrisApp.js +++ /dev/null @@ -1,30 +0,0 @@ -const chrisURL = "/imgs/chris/"; - -function randomChris() { - const files = [ - "chis_very_fried.jpg", - "chris_medium_fried.jpg", - "chris_moshed.jpg", - "fried_publisher.jpg", - "help_me.png", - "nice_chris.png", - "nice_publisher.png", - "bkender_bauob.jpg", - "blurry_chris.jpg", - ]; - - // this chooses a random file from the array - const url = chrisURL + files[Math.floor(Math.random() * files.length)]; - - window.location.href = url; -} - -function findChris() { - const chris = document.getElementById("chris_gif"); - chris - ? chris.addEventListener("click", randomChris) - : console.warn("Couldn't load chris app!"); -} - -// avoiding a race condition here -setTimeout(findChris, 1000); -- cgit v1.2.3