commit a678cfa5b98828a3a6ef56c7e7716cd575e2cd5c parent a2311bd52f19621467ae956ed64befe46d8fa19c Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 27 Apr 2010 07:29:03 +0000 Add |max| parameter to Zotero.ID.getBigInt() Diffstat:
| M | chrome/content/zotero/xpcom/id.js | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/id.js b/chrome/content/zotero/xpcom/id.js @@ -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; }