1
0
Fork 0
forked from mCaptcha/website
mcaptcha-website/assets/js/clipboard.js
2021-03-09 18:56:02 +05:30

18 lines
405 B
JavaScript

import Clipboard from 'clipboard';
var clipboard = new Clipboard('.btn-clipboard');
clipboard.on('success', function(e) {
/*
console.info('Action:', e.action);
console.info('Text:', e.text);
console.info('Trigger:', e.trigger);
*/
e.clearSelection();
});
clipboard.on('error', function(e) {
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
});