Set content type of Blobs in `downloadStory()`

This commit is contained in:
Gnome Ann 2021-12-30 16:51:50 -05:00
parent f9c1e38ee8
commit f4c9f06c4e
2 changed files with 3 additions and 3 deletions

View File

@ -1379,7 +1379,7 @@ function downloadStory(format) {
}
if(format == "plaintext") {
var objectURL = URL.createObjectURL(new Blob(actionlist_compiled));
var objectURL = URL.createObjectURL(new Blob(actionlist_compiled, {type: "text/plain; charset=UTF-8"}));
anchor.setAttribute('href', objectURL);
anchor.setAttribute('download', filename_without_extension + ".txt");
anchor.click();
@ -1425,7 +1425,7 @@ function downloadStory(format) {
worldinfo: wilist_compiled,
wifolders_d: wifolders_d,
wifolders_l: wifolders_l,
}, null, 3)]));
}, null, 3)], {type: "application/json; charset=UTF-8"}));
anchor.setAttribute('href', objectURL);
anchor.setAttribute('download', filename_without_extension + ".json");
anchor.click();

View File

@ -17,7 +17,7 @@
<script src="static/bootstrap.min.js"></script>
<script src="static/bootstrap-toggle.min.js"></script>
<script src="static/rangy-core.min.js"></script>
<script src="static/application.js?ver=1.16.4s"></script>
<script src="static/application.js?ver=1.16.4t"></script>
</head>
<body>
<input type="file" id="remote-save-select" accept="application/json" style="display:none">