summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/downloads
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/components/downloads')
-rw-r--r--application/palemoon/components/downloads/DownloadsCommon.jsm16
-rw-r--r--application/palemoon/components/downloads/content/allDownloadsViewOverlay.js13
2 files changed, 22 insertions, 7 deletions
diff --git a/application/palemoon/components/downloads/DownloadsCommon.jsm b/application/palemoon/components/downloads/DownloadsCommon.jsm
index b90baaf9c..0921f8400 100644
--- a/application/palemoon/components/downloads/DownloadsCommon.jsm
+++ b/application/palemoon/components/downloads/DownloadsCommon.jsm
@@ -867,9 +867,19 @@ DownloadsDataCtor.prototype = {
// Sort backwards by start time, ensuring that the most recent
// downloads are added first regardless of their state.
- let loadedItemsArray = [dataItem
- for each (dataItem in this.dataItems)
- if (dataItem)];
+ // Tycho:
+ //let loadedItemsArray = [dataItem
+ // for each (dataItem in this.dataItems)
+ // if (dataItem)];
+
+ let loadedItemsArray = [];
+
+ for each (let dataItem in this.dataItems) {
+ if (dataItem) {
+ loadedItemsArray.push(dataItem);
+ }
+ }
+
loadedItemsArray.sort(function(a, b) b.startTime - a.startTime);
loadedItemsArray.forEach(
function (dataItem) aView.onDataItemAdded(dataItem, false)
diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js
index e1d0e75d4..9d90b20e1 100644
--- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js
+++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js
@@ -8,9 +8,9 @@
* ON IT AS AN API.
*/
-let Cu = Components.utils;
-let Ci = Components.interfaces;
-let Cc = Components.classes;
+var Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
@@ -1408,7 +1408,12 @@ DownloadsPlacesView.prototype = {
_copySelectedDownloadsToClipboard:
function DPV__copySelectedDownloadsToClipboard() {
let selectedElements = this._richlistbox.selectedItems;
- let urls = [e._shell.downloadURI for each (e in selectedElements)];
+ // Tycho: let urls = [e._shell.downloadURI for each (e in selectedElements)];
+ let urls = [];
+
+ for each (e in selectedElements) {
+ urls.push(e._shell.downloadURI);
+ }
Cc["@mozilla.org/widget/clipboardhelper;1"].
getService(Ci.nsIClipboardHelper).copyString(urls.join("\n"), document);