/*
* have the default list, then if javascript is on,
* turn all badgeDefault* to display: none;, then set all badge* display: initial;.
* and randomize
*
* all html values will have their own const, and will be placed inside the divs in a random order.
* */
/*
*
*
* */
const elke = '
'
const tomo = '
\n'
const lily = '
\n'
const eris = '
\n'
const zvava = '
\n'
const mira = '
\n'
const tempest = '
\n'
const disarray = '
\n'
const astrid = '
\n'
const constellatory = '
\n'
const nbsp = '
\n'
const micro = '
\n'
const loveshock = '
\n'
const pancakes = '
\n'
const sophari = '
\n'
const badges = [
elke,
tomo,
lily,
eris,
zvava,
mira,
tempest,
disarray,
astrid,
constellatory,
nbsp,
micro,
loveshock,
pancakes,
sophari
];
function shuffle(array) {
var currentIndex = array.length;
var temporaryValue;
var randomIndex;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
}
const shuffledBadges = shuffle(badges);
for (var i = 0; i < 3; i++) {
document.getElementById('badge' + (i + 1)).innerHTML = shuffledBadges[i];
}