summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorseth <[email protected]>2023-01-12 22:47:14 -0500
committerseth <[email protected]>2023-01-12 23:22:15 -0500
commit7ebb51e14a8099976f7bbfe6b6d6c56a28fd2e95 (patch)
treecb3173eb37e39a335bb9fdb0e9a2c04fbf3733ad /src/js
parenteb33edcdc85ae0474dbc1cbdb76bf37b86a3deaa (diff)
feat: add chris
Diffstat (limited to 'src/js')
-rw-r--r--src/js/chrisApp.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/js/chrisApp.js b/src/js/chrisApp.js
new file mode 100644
index 0000000..bf51176
--- /dev/null
+++ b/src/js/chrisApp.js
@@ -0,0 +1,23 @@
+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;
+}
+
+var chris = document.getElementById("chris_gif");
+chris.addEventListener("click", randomChris);