mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Bug 92737 - Part 8: Download multiple files when multiple items are dropped on Downloads button
Issue #121
This commit is contained in:
parent
db85d0b733
commit
bafa57d4d6
1 changed files with 12 additions and 9 deletions
|
|
@ -548,15 +548,18 @@ const DownloadsIndicatorView = {
|
||||||
if (dt.mozGetDataAt("application/x-moz-file", 0))
|
if (dt.mozGetDataAt("application/x-moz-file", 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let name = {};
|
let links = browserDragAndDrop.dropLinks(aEvent);
|
||||||
let url = browserDragAndDrop.drop(aEvent, name);
|
if (!links.length)
|
||||||
if (url) {
|
return;
|
||||||
if (url.startsWith("about:")) {
|
let sourceDoc = dt.mozSourceNode ? dt.mozSourceNode.ownerDocument : document;
|
||||||
return;
|
let handled = false;
|
||||||
}
|
for (let link of links) {
|
||||||
|
if (link.url.startsWith("about:"))
|
||||||
let sourceDoc = dt.mozSourceNode ? dt.mozSourceNode.ownerDocument : document;
|
continue;
|
||||||
saveURL(url, name.value, null, true, true, null, sourceDoc);
|
saveURL(link.url, link.name, null, true, true, null, sourceDoc);
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
|
if (handled) {
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue