diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-05-10 15:31:30 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-05-10 15:31:30 +0200 |
commit | 212124e022e68f8c03bfe24bdf08787404126c8c (patch) | |
tree | 6bd4f47b881236ee9bfc5a09aa5d746ea7aa9b19 /slides/security/script.js | |
parent | 6cbf4d867d840014fbbb646e04002395fcec1fb0 (diff) |
Add ICT in de Wolken presentation
Diffstat (limited to 'slides/security/script.js')
-rw-r--r-- | slides/security/script.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/slides/security/script.js b/slides/security/script.js new file mode 100644 index 0000000..4fd6533 --- /dev/null +++ b/slides/security/script.js @@ -0,0 +1,22 @@ +/* global Reveal */ + +Reveal.initialize({ + history: true +}) + +function getRandomInt (min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min +} + +window.fetch('./8char-words.txt').then(r => r.text()).then(res => { + const words = res.split('\n') + const specialChars = ['.', '-', '_', '!', '@', '#', '$', '%'] + + window.setInterval(function () { + const randomWord = words[getRandomInt(0, words.length - 1)] + const randomSpecialChar = specialChars[getRandomInt(0, specialChars.length - 1)] + const randomNumber = getRandomInt(1, 9) + const randomPassword = randomWord + randomSpecialChar + randomNumber + document.querySelector('#changing-passwd').textContent = randomPassword + }, 500) +}) |