mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Merge branch 'johnyma22'
Conflicts: node/utils/Minify.js src/static/js/pad.js src/static/js/pad_docbar.js src/static/js/pad_editbar.js src/static/js/pad_savedrevs.js static/css/timeslider.css static/pad.html
This commit is contained in:
commit
33c53e61c2
13 changed files with 179 additions and 552 deletions
16
src/node/utils/randomstring.js
Normal file
16
src/node/utils/randomstring.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Generates a random String with the given length. Is needed to generate the Author, Group, readonly, session Ids
|
||||
*/
|
||||
var randomString = function randomString(len)
|
||||
{
|
||||
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
var randomstring = '';
|
||||
for (var i = 0; i < len; i++)
|
||||
{
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
randomstring += chars.substring(rnum, rnum + 1);
|
||||
}
|
||||
return randomstring;
|
||||
};
|
||||
|
||||
module.exports = randomString;
|
Loading…
Add table
Add a link
Reference in a new issue