mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -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', {
|
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;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue