mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 08:25:45 -07:00
Revert "WASM: move save file encoding from JS into C."
Now that save files are (even more) officially ASCII, it's perfectly safe to pass them to JavaScript as UTF-8 strings. This means that the form in which save files are shipped from C to JavaScript is the same is the form in which they're shipped from JavaScript to C. That allows for doing new things with them, like writing them to local storage. This reverts commit f729f51e475ff98d0caf529f0723ef810b1c88ef.
This commit is contained in:
@ -363,7 +363,8 @@ function initPuzzle() {
|
||||
"Click to download the "));
|
||||
var a = document.createElement("a");
|
||||
a.download = "puzzle.sav";
|
||||
a.href = "data:application/octet-stream," + savefile_text;
|
||||
a.href = "data:application/octet-stream," +
|
||||
encodeURIComponent(savefile_text);
|
||||
a.appendChild(document.createTextNode("saved-game file"));
|
||||
dlg_form.appendChild(a);
|
||||
dlg_form.appendChild(document.createTextNode("."));
|
||||
|
Reference in New Issue
Block a user