зеркало из https://github.com/mozilla/gecko-dev.git
Bug 562043 - Set the default save folder to the default download folder [Save PDF] [r=vingtetun]
This commit is contained in:
Родитель
e73b502b66
Коммит
77653a7da3
|
@ -1034,6 +1034,9 @@ var PageActions = {
|
|||
picker.defaultExtension = "pdf";
|
||||
picker.defaultString = contentWindow.document.title + ".pdf";
|
||||
|
||||
let dnldMgr = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
|
||||
picker.displayDirectory = dnldMgr.defaultDownloadsDirectory;
|
||||
|
||||
let rv = picker.show();
|
||||
if (rv == Ci.nsIFilePicker.returnCancel)
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче