mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:38:00 +01:00
Use a sensible extension for :saving text/plain documents.
This commit is contained in:
@@ -167,7 +167,10 @@ var Buffer = Module("buffer", {
|
||||
let type = node.contentType || node.QueryInterface(Ci.nsIImageLoadingContent)
|
||||
.getRequest(0).mimeType;
|
||||
|
||||
var ext = "." + services.mime.getPrimaryExtension(type, currExt);
|
||||
if (type === "text/plain")
|
||||
var ext = "." + (currExt || "txt");
|
||||
else
|
||||
ext = "." + services.mime.getPrimaryExtension(type, currExt);
|
||||
}
|
||||
else if (currExt)
|
||||
ext = "." + currExt;
|
||||
|
||||
Reference in New Issue
Block a user