scratch – Diff between revs 44 and 49
?pathlinks?
Rev 44 | Rev 49 | |||
---|---|---|---|---|
Line 155... | Line 155... | |||
155 | $('#trumbowyg').trumbowyg({ |
155 | $('#trumbowyg').trumbowyg({ |
|
156 | autogrow: true, |
156 | autogrow: true, |
|
157 | disabled: true |
157 | disabled: true |
|
158 | }).on('tbwchange', () => { |
158 | }).on('tbwchange', () => { |
|
159 | $('#editor').trumbowyg('disable'); |
159 | $('#editor').trumbowyg('disable'); |
|
160 | $.post('share-text.php', { |
160 | $.post('text.php', { |
|
161 | data: $('#trumbowyg').trumbowyg('html'), |
161 | data: $('#trumbowyg').trumbowyg('html'), |
|
162 | fingerprint: result, |
162 | fingerprint: result, |
|
163 | action: 'SAVE' |
163 | action: 'SAVE' |
|
164 | }).done((data) => { |
164 | }).done((data) => { |
|
165 | $('#trumbowyg').trumbowyg('enable'); |
165 | $('#trumbowyg').trumbowyg('enable'); |
|
Line 167... | Line 167... | |||
167 | $('#trumbowyg').trumbowyg('enable'); |
167 | $('#trumbowyg').trumbowyg('enable'); |
|
168 | }); |
168 | }); |
|
169 | }); |
169 | }); |
|
Line 170... | Line 170... | |||
170 | |
170 | |
|
171 | // Retrieve the contents of the shared file. |
171 | // Retrieve the contents of the shared file. |
|
172 | $.post('share-text.php', |
172 | $.post('text.php', |
|
173 | { |
173 | { |
|
174 | timestamp: window.performance.now(), |
174 | timestamp: window.performance.now(), |
|
175 | fingerprint: result, |
175 | fingerprint: result, |
|
176 | action: 'LOAD' |
176 | action: 'LOAD' |
|
Line 195... | Line 195... | |||
195 | ), |
195 | ), |
|
196 | '.html' |
196 | '.html' |
|
197 | ); |
197 | ); |
|
Line 198... | Line 198... | |||
198 | |
198 | |
|
199 | $.ajax({ |
199 | $.ajax({ |
|
200 | url: 'upload-files.php', |
200 | url: 'file.php', |
|
201 | type: 'POST', |
201 | type: 'POST', |
|
202 | data: formData, |
202 | data: formData, |
|
203 | // cache: false // FF |
203 | // cache: false // FF |
|
204 | processData: false, |
204 | processData: false, |
|
Line 218... | Line 218... | |||
218 | return; |
218 | return; |
|
219 | Cookies.set('nick', nick, { path: '' }); |
219 | Cookies.set('nick', nick, { path: '' }); |
|
220 | result = nick; |
220 | result = nick; |
|
Line 221... | Line 221... | |||
221 | |
221 | |
|
222 | // Retrieve the contents of the shared file. |
222 | // Retrieve the contents of the shared file. |
|
223 | $.post('share-text.php', |
223 | $.post('text.php', |
|
224 | { |
224 | { |
|
225 | timestamp: window.performance.now(), |
225 | timestamp: window.performance.now(), |
|
226 | fingerprint: nick, |
226 | fingerprint: nick, |
|
227 | action: 'LOAD' |
227 | action: 'LOAD' |
|
Line 251... | Line 251... | |||
251 | return; |
251 | return; |
|
252 | Cookies.set('nick', nick, { path: '' }); |
252 | Cookies.set('nick', nick, { path: '' }); |
|
253 | result = nick; |
253 | result = nick; |
|
Line 254... | Line 254... | |||
254 | |
254 | |
|
255 | // Retrieve the contents of the shared file. |
255 | // Retrieve the contents of the shared file. |
|
256 | $.post('share-text.php', |
256 | $.post('text.php', |
|
257 | { |
257 | { |
|
258 | timestamp: window.performance.now(), |
258 | timestamp: window.performance.now(), |
|
259 | fingerprint: nick, |
259 | fingerprint: nick, |
|
260 | action: 'LOAD' |
260 | action: 'LOAD' |
|
Line 282... | Line 282... | |||
282 | return; |
282 | return; |
|
283 | Cookies.set('nick', nick, { path: '' }); |
283 | Cookies.set('nick', nick, { path: '' }); |
|
284 | result = nick; |
284 | result = nick; |
|
Line 285... | Line 285... | |||
285 | |
285 | |
|
286 | // Retrieve the contents of the shared file. |
286 | // Retrieve the contents of the shared file. |
|
287 | $.post('share-text.php', |
287 | $.post('text.php', |
|
288 | { |
288 | { |
|
289 | timestamp: window.performance.now(), |
289 | timestamp: window.performance.now(), |
|
290 | fingerprint: nick, |
290 | fingerprint: nick, |
|
291 | action: 'LOAD' |
291 | action: 'LOAD' |
|
Line 311... | Line 311... | |||
311 | $('#nick').val(fingerprint); |
311 | $('#nick').val(fingerprint); |
|
312 | result = fingerprint; |
312 | result = fingerprint; |
|
313 | nick = fingerprint; |
313 | nick = fingerprint; |
|
Line 314... | Line 314... | |||
314 | |
314 | |
|
315 | // Retrieve the contents of the shared file. |
315 | // Retrieve the contents of the shared file. |
|
316 | $.post('share-text.php', |
316 | $.post('text.php', |
|
317 | { |
317 | { |
|
318 | timestamp: window.performance.now(), |
318 | timestamp: window.performance.now(), |
|
319 | fingerprint: fingerprint, |
319 | fingerprint: fingerprint, |
|
320 | action: 'LOAD' |
320 | action: 'LOAD' |