Add |max| parameter to Zotero.ID.getBigInt()

This commit is contained in:
Dan Stillman 2010-04-27 07:29:03 +00:00
parent a2311bd52f
commit a678cfa5b9

View File

@ -92,8 +92,11 @@ Zotero.ID_Tracker = function () {
}
function getBigInt() {
return Math.floor(Math.random() * (9007199254740991)) + 1;
function getBigInt(max) {
if (!max) {
max = 9007199254740991;
}
return Math.floor(Math.random() * (max)) + 1;
}