scratch – Diff between revs 76 and 81
?pathlinks?
Rev 76 | Rev 81 | |||
---|---|---|---|---|
Line 196... | Line 196... | |||
196 | }).on("queuecomplete", (progress) => { |
196 | }).on("queuecomplete", (progress) => { |
|
197 | document.querySelector("#total-progress") |
197 | document.querySelector("#total-progress") |
|
198 | .style |
198 | .style |
|
199 | .opacity = "0"; |
199 | .opacity = "0"; |
|
200 | }).on("success", (file, data) => { |
200 | }).on("success", (file, data) => { |
|
- | 201 | // Serialize JSON to object. |
||
- | 202 | data = JSON.parse(data); |
||
- | 203 | |
||
201 | // Set the ID of the URL box. |
204 | // Set the ID of the URL box. |
|
202 | const boxURLID = '_' + Math |
205 | const boxURLID = '_' + Math |
|
203 | .random() |
206 | .random() |
|
204 | .toString(36) |
207 | .toString(36) |
|
205 | .substr(2, 9); |
208 | .substr(2, 9); |
|
Line 208... | Line 211... | |||
208 | .querySelector("#URL") |
211 | .querySelector("#URL") |
|
209 | .value = location.protocol |
212 | .value = location.protocol |
|
210 | .concat("//") |
213 | .concat("//") |
|
211 | .concat(window.location.hostname) |
214 | .concat(window.location.hostname) |
|
212 | .concat("/") |
215 | .concat("/") |
|
213 | .concat(data); |
216 | .concat(data.hash); |
|
Line 214... | Line 217... | |||
214 | |
217 | |
|
215 | file |
218 | file |
|
216 | .previewElement |
219 | .previewElement |
|
217 | .querySelector("#URL") |
220 | .querySelector("#URL") |
|
Line 226... | Line 229... | |||
226 | .previewElement |
229 | .previewElement |
|
227 | .querySelector("#deleteURL") |
230 | .querySelector("#deleteURL") |
|
228 | .value = location.protocol.concat("//") |
231 | .value = location.protocol.concat("//") |
|
229 | .concat(window.location.hostname) |
232 | .concat(window.location.hostname) |
|
230 | .concat("/") |
233 | .concat("/") |
|
231 | .concat("delete") |
234 | .concat(data.timestamp) |
|
232 | .concat("/") |
235 | .concat("/") |
|
233 | .concat(data); |
236 | .concat(data.hash); |
|
Line 234... | Line 237... | |||
234 | |
237 | |
|
235 | file |
238 | file |
|
236 | .previewElement |
239 | .previewElement |
|
237 | .querySelector("#deleteURL") |
240 | .querySelector("#deleteURL") |