summaryrefslogtreecommitdiffstats
path: root/application/palemoon
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 11:49:38 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 11:49:38 +0200
commitb15719c7f8c862b3898bd49930bb11f5202dc893 (patch)
tree930ebe2420a6b3b0326bfe170c26ebaade3136fb /application/palemoon
parentc16c115ea719abdcddbe5106e126935c9f391be8 (diff)
downloadUXP-b15719c7f8c862b3898bd49930bb11f5202dc893.tar
UXP-b15719c7f8c862b3898bd49930bb11f5202dc893.tar.gz
UXP-b15719c7f8c862b3898bd49930bb11f5202dc893.tar.lz
UXP-b15719c7f8c862b3898bd49930bb11f5202dc893.tar.xz
UXP-b15719c7f8c862b3898bd49930bb11f5202dc893.zip
Bug 92737 - Part 8: Download multiple files when multiple items are dropped on Downloads button
Issue #121
Diffstat (limited to 'application/palemoon')
-rw-r--r--application/palemoon/components/downloads/content/indicator.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/application/palemoon/components/downloads/content/indicator.js b/application/palemoon/components/downloads/content/indicator.js
index e6a5bd012..1a2175a92 100644
--- a/application/palemoon/components/downloads/content/indicator.js
+++ b/application/palemoon/components/downloads/content/indicator.js
@@ -548,15 +548,18 @@ const DownloadsIndicatorView = {
if (dt.mozGetDataAt("application/x-moz-file", 0))
return;
- let name = {};
- let url = browserDragAndDrop.drop(aEvent, name);
- if (url) {
- if (url.startsWith("about:")) {
- return;
- }
-
- let sourceDoc = dt.mozSourceNode ? dt.mozSourceNode.ownerDocument : document;
- saveURL(url, name.value, null, true, true, null, sourceDoc);
+ let links = browserDragAndDrop.dropLinks(aEvent);
+ if (!links.length)
+ return;
+ let sourceDoc = dt.mozSourceNode ? dt.mozSourceNode.ownerDocument : document;
+ let handled = false;
+ for (let link of links) {
+ if (link.url.startsWith("about:"))
+ continue;
+ saveURL(link.url, link.name, null, true, true, null, sourceDoc);
+ handled = true;
+ }
+ if (handled) {
aEvent.preventDefault();
}
},