mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Add ability to pass urls to the webui download page
This commit is contained in:
@@ -59,12 +59,20 @@ initializeWindows = function() {
|
||||
|
||||
addClickEvent('download', function(e) {
|
||||
new Event(e).stop();
|
||||
showDownloadPage();
|
||||
});
|
||||
|
||||
showDownloadPage = function(urls) {
|
||||
var id = 'downloadPage';
|
||||
var contentUrl = 'download.html';
|
||||
if (urls && urls.length)
|
||||
contentUrl += '?urls=' + urls.join("|");
|
||||
|
||||
new MochaUI.Window({
|
||||
id: id,
|
||||
title: "QBT_TR(Download from URLs)QBT_TR[CONTEXT=downloadFromURL]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'download.html',
|
||||
contentURL: contentUrl,
|
||||
addClass: 'windowFrame', // fixes iframe scrolling on iOS Safari
|
||||
scrollbars: true,
|
||||
maximizable: false,
|
||||
@@ -78,7 +86,7 @@ initializeWindows = function() {
|
||||
}
|
||||
});
|
||||
updateMainData();
|
||||
});
|
||||
};
|
||||
|
||||
addClickEvent('preferences', function(e) {
|
||||
new Event(e).stop();
|
||||
|
||||
Reference in New Issue
Block a user