mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-06 15:04:34 +08:00
Simplify implementation
This commit is contained in:
parent
b2f454399c
commit
881b692c58
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user