1
Fork 0

Alert when copied to clipboard

This commit is contained in:
Jake Howard 2018-11-15 22:46:26 +00:00
parent 9f1c3276d8
commit cb2a7ed9aa
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -54,7 +54,7 @@ var clipboard = new Clipboard('a');
clipboard.on('success', function (e) { clipboard.on('success', function (e) {
var ele = $(e.trigger); var ele = $(e.trigger);
ele.find('i').attr('class', 'fas fa-check'); ele.find('i').attr('class', 'fas fa-check');
ele.attr('title', 'Copied!'); alert('Copied "' + ele.data('clipboard-text') + '" to clipboard!');
}); });
$('[data-clipboard-text]').on('click', function (event) { $('[data-clipboard-text]').on('click', function (event) {