Simplify implementation

This commit is contained in:
Thomas Piccirello 2017-12-28 13:05:28 -05:00
parent b2f454399c
commit 881b692c58

View File

@ -670,21 +670,16 @@ function setupCopyEventHandler() {
clipboardEvent = new ClipboardJS('.copyToClipboard', {
text: function(trigger) {
var textToCopy;
switch (trigger.id) {
case "CopyName":
textToCopy = copyNameFN();
break;
return copyNameFN();
case "CopyMagnetLink":
textToCopy = copyMagnetLinkFN();
break;
return copyMagnetLinkFN();
case "CopyHash":
textToCopy = copyHashFN();
break;
return copyHashFN();
default:
return "";
}
return textToCopy;
}
});
}