Project

General

Profile

Patch #13826 ยป application.js.patch

Filou Centrinov, 2013-04-21 03:44

View differences:

public/javascripts/application.js (working copy)
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
}
    (1-1/1)