Bug 1349437 - Add "save as" support for JSON Viewer. r=honza

Based on https://github.com/mozilla/pdf.js/commit/04599bc4

--HG--
extra : rebase_source : 4902f963895601d40763fc2145f37c7ff7c5bcbc
This commit is contained in:
Oriol 2017-05-03 08:09:00 +02:00
Родитель 08da5c9270
Коммит 4e49debee8
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -96,6 +96,10 @@ Converter.prototype = {
this.charset =
request.QueryInterface(Ci.nsIChannel).contentCharset || "UTF-8";
// Let "save as" save the original JSON, not the viewer
request.QueryInterface(Ci.nsIWritablePropertyBag);
request.setProperty("contentType", "application/json");
this.channel = request;
this.channel.contentType = "text/html";
this.channel.contentCharset = "UTF-8";