Set content type of Blobs in `downloadStory()`
This commit is contained in:
parent
f9c1e38ee8
commit
f4c9f06c4e
|
@ -1379,7 +1379,7 @@ function downloadStory(format) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(format == "plaintext") {
|
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('href', objectURL);
|
||||||
anchor.setAttribute('download', filename_without_extension + ".txt");
|
anchor.setAttribute('download', filename_without_extension + ".txt");
|
||||||
anchor.click();
|
anchor.click();
|
||||||
|
@ -1425,7 +1425,7 @@ function downloadStory(format) {
|
||||||
worldinfo: wilist_compiled,
|
worldinfo: wilist_compiled,
|
||||||
wifolders_d: wifolders_d,
|
wifolders_d: wifolders_d,
|
||||||
wifolders_l: wifolders_l,
|
wifolders_l: wifolders_l,
|
||||||
}, null, 3)]));
|
}, null, 3)], {type: "application/json; charset=UTF-8"}));
|
||||||
anchor.setAttribute('href', objectURL);
|
anchor.setAttribute('href', objectURL);
|
||||||
anchor.setAttribute('download', filename_without_extension + ".json");
|
anchor.setAttribute('download', filename_without_extension + ".json");
|
||||||
anchor.click();
|
anchor.click();
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<script src="static/bootstrap.min.js"></script>
|
<script src="static/bootstrap.min.js"></script>
|
||||||
<script src="static/bootstrap-toggle.min.js"></script>
|
<script src="static/bootstrap-toggle.min.js"></script>
|
||||||
<script src="static/rangy-core.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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input type="file" id="remote-save-select" accept="application/json" style="display:none">
|
<input type="file" id="remote-save-select" accept="application/json" style="display:none">
|
||||||
|
|
Loading…
Reference in New Issue