mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Simplify implementation
This commit is contained in:
parent
b2f454399c
commit
881b692c58
1 changed files with 5 additions and 10 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue