diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-28 17:57:18 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-28 17:57:18 +0200 |
commit | f69729b0aa1d8cd1964994919ab30ce7c7d9f410 (patch) | |
tree | d877e04983b628a9e45271615fc9486712e4a404 /application/palemoon/components/downloads/content/indicator.js | |
parent | b53db93006f732fb2e140137e4713dedca1700d9 (diff) | |
parent | de057c7a5635e65f45ce47162d226b1ddf24e8aa (diff) | |
download | UXP-f69729b0aa1d8cd1964994919ab30ce7c7d9f410.tar UXP-f69729b0aa1d8cd1964994919ab30ce7c7d9f410.tar.gz UXP-f69729b0aa1d8cd1964994919ab30ce7c7d9f410.tar.lz UXP-f69729b0aa1d8cd1964994919ab30ce7c7d9f410.tar.xz UXP-f69729b0aa1d8cd1964994919ab30ce7c7d9f410.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'application/palemoon/components/downloads/content/indicator.js')
-rw-r--r-- | application/palemoon/components/downloads/content/indicator.js | 21 |
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(); } }, |