summaryrefslogtreecommitdiff
path: root/src/js/chrisApp.js
blob: bf5117697ddddb3e703dfcc3a4cae0625705d139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);