diff options
| author | seth <[email protected]> | 2023-03-17 07:37:47 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-03-17 07:39:55 -0400 |
| commit | 74e5fd4f4d0bf40cb682ff48973fdd41d86f747b (patch) | |
| tree | ee3152111bb1d006933b4fda015303af053e7d68 /src/js/chrisApp.js | |
initial commit
Diffstat (limited to 'src/js/chrisApp.js')
| -rw-r--r-- | src/js/chrisApp.js | 23 |
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); |
