forked from zer.ooo/web
fix the copy button so it actually works~
parent
23115b1598
commit
f3bbbf746a
File diff suppressed because one or more lines are too long
@ -0,0 +1,23 @@
|
||||
$(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
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue