1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-12 07:48:04 +00:00

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', { clipboardEvent = new ClipboardJS('.copyToClipboard', {
text: function(trigger) { text: function(trigger) {
var textToCopy;
switch (trigger.id) { switch (trigger.id) {
case "CopyName": case "CopyName":
textToCopy = copyNameFN(); return copyNameFN();
break;
case "CopyMagnetLink": case "CopyMagnetLink":
textToCopy = copyMagnetLinkFN(); return copyMagnetLinkFN();
break;
case "CopyHash": case "CopyHash":
textToCopy = copyHashFN(); return copyHashFN();
break; default:
return "";
} }
return textToCopy;
} }
}); });
} }