mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
* Add copy options to webui context menu Add Copy Hash to gui (closes #6964) * Use switch statement * Use camel case, switch from signal to qaction. * Rename variable * Change variable name
This commit is contained in:
committed by
Mike Tzou
parent
08aa827366
commit
145641ac41
@@ -451,6 +451,36 @@ initializeWindows = function() {
|
||||
}
|
||||
};
|
||||
|
||||
copyNameFN = function() {
|
||||
var selectedRows = torrentsTable.selectedRowsIds();
|
||||
var names = [];
|
||||
if (selectedRows.length) {
|
||||
var rows = torrentsTable.getFilteredAndSortedRows();
|
||||
for (var i = 0; i < selectedRows.length; i++) {
|
||||
var hash = selectedRows[i];
|
||||
names.push(rows[hash].full_data.name);
|
||||
}
|
||||
}
|
||||
return names.join("\n");
|
||||
};
|
||||
|
||||
copyMagnetLinkFN = function() {
|
||||
var selectedRows = torrentsTable.selectedRowsIds();
|
||||
var magnets = [];
|
||||
if (selectedRows.length) {
|
||||
var rows = torrentsTable.getFilteredAndSortedRows();
|
||||
for (var i = 0; i < selectedRows.length; i++) {
|
||||
var hash = selectedRows[i];
|
||||
magnets.push(rows[hash].full_data.magnet_uri);
|
||||
}
|
||||
}
|
||||
return magnets.join("\n");
|
||||
};
|
||||
|
||||
copyHashFN = function() {
|
||||
return torrentsTable.selectedRowsIds().join("\n");
|
||||
};
|
||||
|
||||
['pauseAll', 'resumeAll'].each(function(item) {
|
||||
addClickEvent(item, function(e) {
|
||||
new Event(e).stop();
|
||||
|
||||
Reference in New Issue
Block a user