##// END OF EJS Templates
application.js: randomKey function optimization (#13826)...
Toshi MARUYAMA -
r11511:86442e60edef
parent child
Show More
@@ -431,10 +431,10 function scmEntryClick(id, url) {
431 431 }
432 432
433 433 function randomKey(size) {
434 var chars = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
434 var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
435 435 var key = '';
436 for (i = 0; i < size; i++) {
437 key += chars[Math.floor(Math.random() * chars.length)];
436 for (var i = 0; i < size; i++) {
437 key += chars.charAt(Math.floor(Math.random() * chars.length));
438 438 }
439 439 return key;
440 440 }
General Comments 0
You need to be logged in to leave comments. Login now