horiyouta commited on
Commit
1d5dbe3
·
1 Parent(s): 0aca1c4

2410191108

Browse files
Files changed (1) hide show
  1. public/script.js +0 -3
public/script.js CHANGED
@@ -122,7 +122,6 @@ const sb3 = async () => {
122
  method: `POST`,
123
  body: JSON.stringify([Blockly.JavaScript.workspaceToCode(workspace).split('$')[1], ...costumes])
124
  })
125
- .then(res => res.json())
126
  .then(sb3Base64 => {
127
  const sb3Data = Uint8Array.from(atob(sb3Base64), c => c.charCodeAt(0));
128
 
@@ -138,7 +137,6 @@ const save = async () => {
138
  method: `POST`,
139
  body: JSON.stringify([Blockly.JavaScript.workspaceToCode(workspace).split('$')[1], ...costumes])
140
  })
141
- .then(res => res.json())
142
  .then(base64Zip => {
143
  const zipData = Uint8Array.from(atob(base64Zip), c => c.charCodeAt(0));
144
 
@@ -162,7 +160,6 @@ const load = async () => {
162
  method: `POST`,
163
  body: base64Data
164
  })
165
- .then(res => res.json())
166
  .then(data => {
167
  const dom = (new DOMParser()).parseFromString(data[0], `application/xml`);
168
  workspace.clear();
 
122
  method: `POST`,
123
  body: JSON.stringify([Blockly.JavaScript.workspaceToCode(workspace).split('$')[1], ...costumes])
124
  })
 
125
  .then(sb3Base64 => {
126
  const sb3Data = Uint8Array.from(atob(sb3Base64), c => c.charCodeAt(0));
127
 
 
137
  method: `POST`,
138
  body: JSON.stringify([Blockly.JavaScript.workspaceToCode(workspace).split('$')[1], ...costumes])
139
  })
 
140
  .then(base64Zip => {
141
  const zipData = Uint8Array.from(atob(base64Zip), c => c.charCodeAt(0));
142
 
 
160
  method: `POST`,
161
  body: base64Data
162
  })
 
163
  .then(data => {
164
  const dom = (new DOMParser()).parseFromString(data[0], `application/xml`);
165
  workspace.clear();