During my work I need to get new GUID for some reasons. I've created bookmarklet to generate GUID
Javascript:
function createUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
alert(createUUID())
And now I'm trying to find out how to add a Copy to Clipboard button there. Customization of alert() or confirm() is impossible so I need to call some popup first and then do other things.
Please help to start :)