regenerate random password, some layout changes

This commit is contained in:
2018-09-30 12:23:40 +02:00
parent 5a32e9ad21
commit 7e0ccd16e8
4 changed files with 108 additions and 41 deletions

View File

@@ -0,0 +1,15 @@
export function generatePassword() {
//Creates a unique id for each chat bubble so that the animation can be triggered
var random = "";
var possible = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP0123456";
for (var i = 0; i < 16; i++)
random += possible.charAt(Math.floor(Math.random() * possible.length));
while(true) {
if(!document.getElementById(random)) {
return random;
}
}
}