Initial commit
This commit is contained in:
19
js/main.js
Normal file
19
js/main.js
Normal file
@@ -0,0 +1,19 @@
|
||||
(function () {
|
||||
const wgrnhText = document.getElementById('wgrnh-text');
|
||||
|
||||
const possibleTexts = [
|
||||
'Nu',
|
||||
'Een half uur geleden',
|
||||
'Zo snel mogelijk',
|
||||
'Als het even kan nu',
|
||||
];
|
||||
|
||||
function setRandomText() {
|
||||
const idx = Math.round(Math.random() * (possibleTexts.length - 1));
|
||||
|
||||
wgrnhText.innerText = possibleTexts[idx];
|
||||
}
|
||||
|
||||
setRandomText();
|
||||
wgrnhText.addEventListener('click', setRandomText);
|
||||
})();
|
||||
Reference in New Issue
Block a user