File: uuid.js

package info (click to toggle)
greasemonkey 2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,820 kB
  • sloc: xml: 171; makefile: 10
file content (10 lines) | stat: -rw-r--r-- 292 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
const EXPORTED_SYMBOLS = ['uuid'];

const uuidGenerator = Components
    .classes["@mozilla.org/uuid-generator;1"]
    .getService(Components.interfaces.nsIUUIDGenerator);

function uuid(msg) {
  var uuid = uuidGenerator.generateUUID().toString();
  return uuid.substring(1,uuid.length-1);
}