Skip to content

Commit

Permalink
Reopen panel after click on downloads inside panel
Browse files Browse the repository at this point in the history
(#18)
  • Loading branch information
Infocatcher committed Nov 18, 2014
1 parent 34b2874 commit 7b41899
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions downloadsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ var downloadsPanel = {
},

panelClick: function(e) {
// See chrome://browser/content/downloads/downloads.js, DownloadsView.onDownloadClick()
if(e.button == 0 && !e.originalTarget.hasAttribute("oncommand")) {
// => goDoCommand("downloadsCmd_open");
var window = e.target.ownerDocument.defaultView;
window.setTimeout(function() {
window.DownloadsPanel.showPanel();
}, prefs.get("reopenPanelAfterShowFile.delay"));
}

if(e.button != 1 || !prefs.get("middleClickToRemoveFromPanel"))
return;
var dlController = this.dpt.da.getDlController(e.target);
Expand Down

0 comments on commit 7b41899

Please sign in to comment.