From 72def35cd0cf3649b6d7ab72b66117df3e1c33fc Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 26 Apr 2018 00:19:51 +0200 Subject: [PALEMOON] [frontend vs backend] Downloads: Fix - the context menu - "Copy Download Link" Issue #121 --- .../components/downloads/content/allDownloadsViewOverlay.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (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 4ed2b6e3d..054f0405f 100644 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js @@ -1394,16 +1394,11 @@ DownloadsPlacesView.prototype = { _copySelectedDownloadsToClipboard: function DPV__copySelectedDownloadsToClipboard() { - let selectedElements = this._richlistbox.selectedItems; - // Tycho: let urls = [e._shell.downloadURI for each (e in selectedElements)]; - let urls = []; - - for each (e in selectedElements) { - urls.push(e._shell.downloadURI); - } + let urls = [for (element of this._richlistbox.selectedItems) + element._shell.downloadURI]; Cc["@mozilla.org/widget/clipboardhelper;1"]. - getService(Ci.nsIClipboardHelper).copyString(urls.join("\n"), document); + getService(Ci.nsIClipboardHelper).copyString(urls.join("\n")); }, _getURLFromClipboardData: function DPV__getURLFromClipboardData() { -- cgit v1.2.3