(uuid)
| 19 | } |
| 20 | |
| 21 | function formatUUID(uuid) { |
| 22 | var fmt = $('uuidFormat').value; |
| 23 | switch (fmt) { |
| 24 | case 'nohyphen': return uuid.replace(/-/g, ''); |
| 25 | case 'upper': return uuid.toUpperCase(); |
| 26 | case 'braces': return '{' + uuid + '}'; |
| 27 | default: return uuid; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | function generateUUIDs() { |
| 32 | var count = Math.min(Math.max(parseInt($('uuidCount').value) || 1, 1), 100); |