forked from zer.ooo/web
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
385 B
JavaScript
24 lines
385 B
JavaScript
$(function () {
|
|
var clipboard = new Clipboard('.copy');
|
|
|
|
clipboard.on('success', function(e) {
|
|
$(e.trigger).text('Copied!')
|
|
setTimeout(
|
|
function () {
|
|
$(e.trigger).text('Copy');
|
|
},
|
|
2000
|
|
);
|
|
});
|
|
|
|
clipboard.on('error', function(e) {
|
|
$(e.trigger).text('Couldn\t copy :(')
|
|
setTimeout(
|
|
function () {
|
|
$(e.trigger).text('Copy');
|
|
},
|
|
2000
|
|
);
|
|
});
|
|
});
|