From 02dffb57c8c330ae6d299141ae97ae23f433a927 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 15 Apr 2018 11:52:31 +0200 Subject: Bug 92737 - Part 9: Download multiple files when multiple items are dropped on Downloads view in Library Window Issue #121 --- .../components/downloads/content/allDownloadsViewOverlay.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'application/palemoon/components') diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js index 46e867068..d9758cb09 100644 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js @@ -1594,10 +1594,14 @@ DownloadsPlacesView.prototype = { if (dt.mozGetDataAt("application/x-moz-file", 0)) return; - let name = { }; - let url = Services.droppedLinkHandler.dropLink(aEvent, name); - if (url) - DownloadURL(url, name.value); + let links = Services.droppedLinkHandler.dropLinks(aEvent); + if (!links.length) + return; + for (let link of links) { + if (link.url.startsWith("about:")) + continue; + DownloadURL(link.url, link.name); + } } }; -- cgit v1.2.3