From 45f3d2bf068f90b8a397bbada9b07dda7c831647 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 7 Apr 2018 12:33:16 -0400 Subject: [PALEMOON] Fix for loops in DownloadsCommon.jsm and WindowsPreviewPerTab.jsm (SyntaxError: missing ] after element list) --- .../palemoon/components/downloads/DownloadsCommon.jsm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'application/palemoon/components/downloads') 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) -- cgit v1.2.3 From 0d0cf693ac1d8c9429959a41c118e335d0d94a55 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 9 Apr 2018 08:32:30 -0400 Subject: [PALEMOON] Fix for loops in allDownloadsViewOverlay.js (SyntaxError: missing ] after element list) --- .../components/downloads/content/allDownloadsViewOverlay.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'application/palemoon/components/downloads') diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js index e1d0e75d4..51f32601a 100644 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js @@ -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); -- cgit v1.2.3