scratch – Diff between revs 64 and 65

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 64 Rev 65
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> 6 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
7 <meta http-equiv="Pragma" content="no-cache" /> 7 <meta http-equiv="Pragma" content="no-cache" />
8 <meta http-equiv="Expires" content="0" /> 8 <meta http-equiv="Expires" content="0" />
9 <meta name="viewport" content="width=device-width, initial-scale=1"> 9 <meta name="viewport" content="width=device-width, initial-scale=1">
10 <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> 10 <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
11 <meta name="description" content="quick asset upload"> 11 <meta name="description" content="quick asset upload">
12 <meta name="author" content="Wizardry and Steamworks"> 12 <meta name="author" content="Wizardry and Steamworks">
13 <link rel="icon" href="favicon.ico"> 13 <link rel="icon" href="favicon.ico">
14   14  
15 <title>scratch</title> 15 <title>scratch</title>
16   16  
17 <!-- Bootstrap core CSS --> 17 <!-- Bootstrap core CSS -->
18 <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> 18 <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
-   19 <!-- Font Awesome -->
-   20 <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet">
19 <!-- Trumbowyg --> 21 <!-- Trumbowyg -->
20 <link href="bower_components/trumbowyg/dist/ui/trumbowyg.min.css" rel="stylesheet"> 22 <link href="bower_components/trumbowyg/dist/ui/trumbowyg.min.css" rel="stylesheet">
21 <!-- Local style --> 23 <!-- Local style -->
22 <link href="css/text/style.css" rel="stylesheet"> 24 <link href="css/text/style.css" rel="stylesheet">
23 </head> 25 </head>
24   26  
25 <body> 27 <body>
26   28  
27 <div class="container"> 29 <div class="container">
28   30  
29 <!-- Main component for a primary marketing message or call to action --> 31 <!-- Main component for a primary marketing message or call to action -->
30 <div class="jumbotron"> 32 <div class="jumbotron">
31 <h1>Scratch</h1> 33 <h1>Scratch</h1>
32 <p>Asset sharing platform.</p> 34 <p>Asset sharing platform.</p>
33 </div> 35 </div>
34 36
35 <ul class="nav nav-tabs"> 37 <ul class="nav nav-tabs">
36 <li><a href="index.html">Home</a></li> 38 <li><a href="index.html">Home</a></li>
37 <li><a href="file.html">File</a></li> 39 <li><a href="file.html">File</a></li>
38 <li class="active"><a href="#">Text</a></li> 40 <li class="active"><a href="#">Text</a></li>
39 </ul> 41 </ul>
40 42
41 <div class="panel panel-default"> 43 <div class="panel panel-default">
42 <div class="panel-heading"> 44 <div class="panel-heading">
43 <div class="form-group"> 45 <div class="form-group">
44 <div class="input-group"> 46 <div class="input-group">
45 <span class="input-group-btn"> 47 <span class="input-group-btn">
46 <button id="save" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Generate link."> 48 <button id="save" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Generate link.">
47 <i class="glyphicon glyphicon-share"></i> 49 <i class="glyphicon glyphicon-share"></i>
48 </button> 50 </button>
49 </span> 51 </span>
50 <input id="URL" type="text" class="form-control" readonly> 52 <input id="URL" type="text" class="form-control" readonly>
51 <span class="input-group-btn"> 53 <span class="input-group-btn">
52 <button id="copy-url" class="btn btn-default" type="button" data-clipboard-target="#URL" data-toggle="tooltip" data-placement="auto" title="Copy to clipboard."><i class="glyphicon glyphicon-paperclip"></i></button> 54 <button id="copy-url" class="btn btn-default" type="button" data-clipboard-target="#URL" data-toggle="tooltip" data-placement="auto" title="Copy to clipboard."><i class="glyphicon glyphicon-paperclip"></i></button>
53 </span> 55 </span>
54 </div> 56 </div>
55 </div> 57 </div>
56 <form id="nick-form" role="form"> 58 <form id="nick-form" role="form">
57 <div class="form-group has-feedback"> 59 <div class="form-group has-feedback">
58 <div class="input-group"> 60 <div class="input-group">
59 <span class="input-group-btn"> 61 <span class="input-group-btn">
60 <button id="go" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Load document."> 62 <button id="go" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Load document.">
61 <i class="glyphicon glyphicon-play"></i> 63 <i class="glyphicon glyphicon-play"></i>
62 </button> 64 </button>
63 </span> 65 </span>
64 <span class="input-group-btn"> 66 <span class="input-group-btn">
65 <button id="reset" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Reset document."> 67 <button id="reset" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Reset document.">
66 <i id="home-icon" class="glyphicon glyphicon-home"></i> 68 <i id="home-icon" class="glyphicon glyphicon-home"></i>
67 </button> 69 </button>
68 </span> 70 </span>
69 <input id="nick" type="text" class="form-control" pattern="^[A-Za-z0-9]{32}$" maxlength="32"> 71 <input id="nick" type="text" class="form-control" pattern="^[A-Za-z0-9]{32}$" maxlength="32">
70 <span class="input-group-btn"> 72 <span class="input-group-btn">
71 <button id="copy-nick" class="btn btn-default" type="button" data-clipboard-target="#nick" data-toggle="tooltip" data-placement="auto" title="Copy to clipboard."><i class="glyphicon glyphicon-paperclip"></i></button> 73 <button id="copy-nick" class="btn btn-default" type="button" data-clipboard-target="#nick" data-toggle="tooltip" data-placement="auto" title="Copy to clipboard."><i class="glyphicon glyphicon-paperclip"></i></button>
72 </span> 74 </span>
73 </div> 75 </div>
74 </div> 76 </div>
75 </form> 77 </form>
76 </div> 78 </div>
77 <div class="panel-body" id="editorpanel"> 79 <div class="panel-body" id="editorpanel">
78 <div id="trumbowyg" style="display: none; font-family: monospace;"> 80 <div id="trumbowyg" style="display: none; font-family: monospace;">
79 </div> 81 </div>
80 </div> 82 </div>
81 </div> 83 </div>
82   84  
83 </div> <!-- /container --> 85 </div> <!-- /container -->
84 86
85 <div id="footer"> 87 <div id="footer">
86 <div class="container"> 88 <div class="container">
87 <p class="text-muted credit">Copyright <i class="glyphicon glyphicon-copyright-mark"></i> 2017 <a href="http://grimore.org">Wizardry and Steamworks</a>.</p> 89 <p class="text-muted credit">Copyright <i class="glyphicon glyphicon-copyright-mark"></i> 2017 <a href="http://grimore.org">Wizardry and Steamworks</a>.</p>
88 </div> 90 </div>
89 </div> 91 </div>
90   92  
91 <!-- jQuery --> 93 <!-- jQuery -->
92 <script src="bower_components/jquery/dist/jquery.min.js"></script> 94 <script src="bower_components/jquery/dist/jquery.min.js"></script>
93 <!-- BootStrap --> 95 <!-- BootStrap -->
94 <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> 96 <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
95 97
96 <!-- Trumbowyg --> 98 <!-- Trumbowyg -->
97 <script src="bower_components/trumbowyg/dist/trumbowyg.min.js"></script> 99 <script src="bower_components/trumbowyg/dist/trumbowyg.min.js"></script>
98 <!-- Clipboard --> 100 <!-- Clipboard -->
99 <script src="bower_components/clipboard/dist/clipboard.min.js"></script> 101 <script src="bower_components/clipboard/dist/clipboard.min.js"></script>
100 <!-- Fingerprint 2 --> 102 <!-- Fingerprint 2 -->
101 <script src="bower_components/fingerprintjs2/dist/fingerprint2.min.js"></script> 103 <script src="bower_components/fingerprintjs2/dist/fingerprint2.min.js"></script>
102 <!-- js-cookie --> 104 <!-- js-cookie -->
103 <script src="bower_components/js-cookie/src/js.cookie.js"></script> 105 <script src="bower_components/js-cookie/src/js.cookie.js"></script>
104 <!-- Bootstrap Validator --> 106 <!-- Bootstrap Validator -->
105 <script src="bower_components/bootstrap-validator/dist/validator.min.js"></script> 107 <script src="bower_components/bootstrap-validator/dist/validator.min.js"></script>
106 <script> 108 <script>
107 $(document).ready(() => { 109 $(document).ready(() => {
108 // Attach the form validator. 110 // Attach the form validator.
109 $('#nick-form').validator({ 111 $('#nick-form').validator({
110 focus: false 112 focus: false
111 }); 113 });
112 114
113 // Enable the Clipboard button. 115 // Enable the Clipboard button.
114 new Clipboard('#copy-url'); 116 new Clipboard('#copy-url');
115 117
116 // Get the fingerprint. 118 // Get the fingerprint.
117 new Fingerprint2({ 119 new Fingerprint2({
118 //excludeUserAgent: true, 120 //excludeUserAgent: true,
119 //excludeLanguage: true, 121 //excludeLanguage: true,
120 excludeColorDepth: true, 122 excludeColorDepth: true,
121 excludeScreenResolution: true, 123 excludeScreenResolution: true,
122 excludeAvailableScreenResolution: true, 124 excludeAvailableScreenResolution: true,
123 //excludeTimezoneOffset: true, 125 //excludeTimezoneOffset: true,
124 excludeSessionStorage: true, 126 excludeSessionStorage: true,
125 excludeIndexedDB: true, 127 excludeIndexedDB: true,
126 excludeAddBehavior: true, 128 excludeAddBehavior: true,
127 excludeOpenDatabase: true, 129 excludeOpenDatabase: true,
128 //excludeCpuClass: true, 130 //excludeCpuClass: true,
129 //excludePlatform: true, 131 //excludePlatform: true,
130 excludeDoNotTrack: true, 132 excludeDoNotTrack: true,
131 excludeCanvas: true, 133 excludeCanvas: true,
132 excludeWebGL: true, 134 excludeWebGL: true,
133 excludeAdBlock: true, 135 excludeAdBlock: true,
134 //excludeHasLiedLanguages: true, 136 //excludeHasLiedLanguages: true,
135 //excludeHasLiedResolution: true, 137 //excludeHasLiedResolution: true,
136 //excludeHasLiedOs: true, 138 //excludeHasLiedOs: true,
137 //excludeHasLiedBrowser: true, 139 //excludeHasLiedBrowser: true,
138 excludeJsFonts: true, 140 excludeJsFonts: true,
139 excludeFlashFonts: true, 141 excludeFlashFonts: true,
140 excludePlugins: true, 142 excludePlugins: true,
141 excludeIEPlugins: true, 143 excludeIEPlugins: true,
142 //excludeTouchSupport: true, 144 //excludeTouchSupport: true,
143 excludePixelRatio: true 145 excludePixelRatio: true
144 }).get((result, components) => { 146 }).get((result, components) => {
145 // Set the nick as a cookie. 147 // Set the nick as a cookie.
146 const fingerprint = result; 148 const fingerprint = result;
147 var nick = Cookies.get('nick'); 149 var nick = Cookies.get('nick');
148 if(!nick || nick.length !== 32) { 150 if(!nick || nick.length !== 32) {
149 Cookies.set('nick', result, { path: '' }); 151 Cookies.set('nick', result, { path: '' });
150 nick = result; 152 nick = result;
151 } 153 }
152 else 154 else
153 result = nick; 155 result = nick;
154 156
155 // Set the nick. 157 // Set the nick.
156 $('#nick').val(result); 158 $('#nick').val(result);
157 new Clipboard('#copy-nick'); 159 new Clipboard('#copy-nick');
158 160
159 if(fingerprint == nick) 161 if(fingerprint == nick)
160 $('#home-icon').addClass("text-success"); 162 $('#home-icon').addClass("text-success");
161 else 163 else
162 $('#home-icon').addClass("text-danger"); 164 $('#home-icon').addClass("text-danger");
163 165
164 function saveTextFile() { 166 function saveTextFile() {
165 $.post('text.php', { 167 $.post('text.php', {
166 data: $('#trumbowyg').trumbowyg('html'), 168 data: $('#trumbowyg').trumbowyg('html'),
167 fingerprint: result, 169 fingerprint: result,
168 action: 'SAVE', 170 action: 'SAVE',
169 timeout: 0 171 timeout: 0
170 }); 172 });
171 } 173 }
172 var autoSaveTimeoutID = window.setTimeout(saveTextFile, 250); 174 var autoSaveTimeoutID = window.setTimeout(saveTextFile, 250);
173 175
174 // Load the editor. 176 // Load the editor.
175 $('#trumbowyg').trumbowyg({ 177 $('#trumbowyg').trumbowyg({
176 autogrow: true, 178 autogrow: true,
177 disabled: true 179 disabled: true
178 }).on('tbwchange', () => { 180 }).on('tbwchange', () => {
179 // Clear the value of the URL box because the URL will have changed. 181 // Clear the value of the URL box because the URL will have changed.
180 $('#URL').val(''); 182 $('#URL').val('');
181 // Reschedule saving of the file. 183 // Reschedule saving of the file.
182 window.clearTimeout(autoSaveTimeoutID); 184 window.clearTimeout(autoSaveTimeoutID);
183 autoSaveTimeoutID = window.setTimeout(saveTextFile, 250); 185 autoSaveTimeoutID = window.setTimeout(saveTextFile, 250);
184 }); 186 });
185 187
186 // Retrieve the contents of the shared file. 188 // Retrieve the contents of the shared file.
187 $('#trumbowyg').trumbowyg('disable'); 189 $('#trumbowyg').trumbowyg('disable');
188 $.post('text.php', 190 $.post('text.php',
189 { 191 {
190 timestamp: window.performance.now(), 192 timestamp: window.performance.now(),
191 fingerprint: result, 193 fingerprint: result,
192 action: 'LOAD' 194 action: 'LOAD'
193 }).done((data) => {; 195 }).done((data) => {;
194 $('#trumbowyg') 196 $('#trumbowyg')
195 .trumbowyg('html', data); 197 .trumbowyg('html', data);
196 $('#trumbowyg').trumbowyg('enable'); 198 $('#trumbowyg').trumbowyg('enable');
197 $('#trumbowyg').show(); 199 $('#trumbowyg').show();
198 }).fail(() => { 200 }).fail(() => {
199 $('#trumbowyg').trumbowyg('enable'); 201 $('#trumbowyg').trumbowyg('enable');
200 $('#trumbowyg').show(); 202 $('#trumbowyg').show();
201 }); 203 });
202 204
203 $('#save').click(() => { 205 $('#save').click(() => {
204 $('#editor').trumbowyg('disable'); 206 $('#editor').trumbowyg('disable');
205 var formData = new FormData(); 207 var formData = new FormData();
206 formData.append('file', new Blob( 208 formData.append('file', new Blob(
207 [ 209 [
208 $('#trumbowyg').trumbowyg('html') 210 $('#trumbowyg').trumbowyg('html')
209 ] 211 ]
210 ), 212 ),
211 '.html' 213 '.html'
212 ); 214 );
213 215
214 $.ajax({ 216 $.ajax({
215 url: 'file.php', 217 url: 'file.php',
216 type: 'POST', 218 type: 'POST',
217 data: formData, 219 data: formData,
218 // cache: false // FF 220 // cache: false // FF
219 processData: false, 221 processData: false,
220 contentType: false 222 contentType: false
221 }).done((data) => { 223 }).done((data) => {
222 $('#URL').val(data); 224 $('#URL').val(data);
223 $('#trumbowyg').trumbowyg('enable'); 225 $('#trumbowyg').trumbowyg('enable');
224 }).fail(() => { 226 }).fail(() => {
225 $('#trumbowyg').trumbowyg('enable'); 227 $('#trumbowyg').trumbowyg('enable');
226 }); 228 });
227 }); 229 });
228 230
229 // When the button is clicked, navigate to the fingerprint. 231 // When the button is clicked, navigate to the fingerprint.
230 $('#go').click(() => { 232 $('#go').click(() => {
231 nick = $('#nick').val(); 233 nick = $('#nick').val();
232 if(!nick || nick.length != 32) 234 if(!nick || nick.length != 32)
233 return; 235 return;
234 Cookies.set('nick', nick, { path: '' }); 236 Cookies.set('nick', nick, { path: '' });
235 result = nick; 237 result = nick;
236 238
237 // Retrieve the contents of the shared file. 239 // Retrieve the contents of the shared file.
238 $('#editor').trumbowyg('disable'); 240 $('#editor').trumbowyg('disable');
239 $.post('text.php', 241 $.post('text.php',
240 { 242 {
241 timestamp: window.performance.now(), 243 timestamp: window.performance.now(),
242 fingerprint: nick, 244 fingerprint: nick,
243 action: 'LOAD' 245 action: 'LOAD'
244 }).done((data) => {; 246 }).done((data) => {;
245 $('#trumbowyg') 247 $('#trumbowyg')
246 .trumbowyg('html', data); 248 .trumbowyg('html', data);
247 $('#trumbowyg').trumbowyg('enable'); 249 $('#trumbowyg').trumbowyg('enable');
248 $('#trumbowyg').show(); 250 $('#trumbowyg').show();
249 251
250 if(fingerprint == nick) 252 if(fingerprint == nick)
251 $('#home-icon').addClass("text-success").removeClass("text-danger"); 253 $('#home-icon').addClass("text-success").removeClass("text-danger");
252 else 254 else
253 $('#home-icon').addClass("text-danger").removeClass("text-success"); 255 $('#home-icon').addClass("text-danger").removeClass("text-success");
254 256
255 }).fail(() => { 257 }).fail(() => {
256 $('#trumbowyg').trumbowyg('enable'); 258 $('#trumbowyg').trumbowyg('enable');
257 $('#trumbowyg').show(); 259 $('#trumbowyg').show();
258 }); 260 });
259 }); 261 });
260 262
261 // When the form is submitted, naigate to the fingerprint. 263 // When the form is submitted, naigate to the fingerprint.
262 $('#nick-form').submit((e) => { 264 $('#nick-form').submit((e) => {
263 e.preventDefault(); 265 e.preventDefault();
264 266
265 nick = $('#nick').val(); 267 nick = $('#nick').val();
266 if(!nick || nick.length != 32) 268 if(!nick || nick.length != 32)
267 return; 269 return;
268 Cookies.set('nick', nick, { path: '' }); 270 Cookies.set('nick', nick, { path: '' });
269 result = nick; 271 result = nick;
270 272
271 // Retrieve the contents of the shared file. 273 // Retrieve the contents of the shared file.
272 $('#editor').trumbowyg('disable'); 274 $('#editor').trumbowyg('disable');
273 $.post('text.php', 275 $.post('text.php',
274 { 276 {
275 timestamp: window.performance.now(), 277 timestamp: window.performance.now(),
276 fingerprint: nick, 278 fingerprint: nick,
277 action: 'LOAD' 279 action: 'LOAD'
278 }).done((data) => {; 280 }).done((data) => {;
279 $('#trumbowyg') 281 $('#trumbowyg')
280 .trumbowyg('html', data); 282 .trumbowyg('html', data);
281 $('#trumbowyg').trumbowyg('enable'); 283 $('#trumbowyg').trumbowyg('enable');
282 $('#trumbowyg').show(); 284 $('#trumbowyg').show();
283 285
284 if(fingerprint == nick) 286 if(fingerprint == nick)
285 $('#home-icon').addClass("text-success").removeClass("text-danger"); 287 $('#home-icon').addClass("text-success").removeClass("text-danger");
286 else 288 else
287 $('#home-icon').addClass("text-danger").removeClass("text-success"); 289 $('#home-icon').addClass("text-danger").removeClass("text-success");
288 290
289 }).fail(() => { 291 }).fail(() => {
290 $('#trumbowyg').trumbowyg('enable'); 292 $('#trumbowyg').trumbowyg('enable');
291 $('#trumbowyg').show(); 293 $('#trumbowyg').show();
292 }); 294 });
293 }); 295 });
294 296
295 // While the nick is changing, navigate to the changed fingerprint. 297 // While the nick is changing, navigate to the changed fingerprint.
296 $("#nick").on('input', () => { 298 $("#nick").on('input', () => {
297 nick = $('#nick').val(); 299 nick = $('#nick').val();
298 if(!nick || nick.length != 32) 300 if(!nick || nick.length != 32)
299 return; 301 return;
300 Cookies.set('nick', nick, { path: '' }); 302 Cookies.set('nick', nick, { path: '' });
301 result = nick; 303 result = nick;
302 304
303 // Retrieve the contents of the shared file. 305 // Retrieve the contents of the shared file.
304 $('#editor').trumbowyg('disable'); 306 $('#editor').trumbowyg('disable');
305 $.post('text.php', 307 $.post('text.php',
306 { 308 {
307 timestamp: window.performance.now(), 309 timestamp: window.performance.now(),
308 fingerprint: nick, 310 fingerprint: nick,
309 action: 'LOAD' 311 action: 'LOAD'
310 }).done((data) => {; 312 }).done((data) => {;
311 $('#trumbowyg') 313 $('#trumbowyg')
312 .trumbowyg('html', data); 314 .trumbowyg('html', data);
313 $('#trumbowyg').trumbowyg('enable'); 315 $('#trumbowyg').trumbowyg('enable');
314 $('#trumbowyg').show(); 316 $('#trumbowyg').show();
315 317
316 if(fingerprint == nick) 318 if(fingerprint == nick)
317 $('#home-icon').addClass("text-success").removeClass("text-danger"); 319 $('#home-icon').addClass("text-success").removeClass("text-danger");
318 else 320 else
319 $('#home-icon').addClass("text-danger").removeClass("text-success"); 321 $('#home-icon').addClass("text-danger").removeClass("text-success");
320 }).fail(() => { 322 }).fail(() => {
321 $('#trumbowyg').trumbowyg('enable'); 323 $('#trumbowyg').trumbowyg('enable');
322 $('#trumbowyg').show(); 324 $('#trumbowyg').show();
323 }); 325 });
324 }); 326 });
325 327
326 // When the reset button is pressed, navigate to the fingerprint. 328 // When the reset button is pressed, navigate to the fingerprint.
327 $('#reset').click(() => { 329 $('#reset').click(() => {
328 Cookies.set('nick', fingerprint, { path: '' }); 330 Cookies.set('nick', fingerprint, { path: '' });
329 $('#nick').val(fingerprint); 331 $('#nick').val(fingerprint);
330 result = fingerprint; 332 result = fingerprint;
331 nick = fingerprint; 333 nick = fingerprint;
332 334
333 // Retrieve the contents of the shared file. 335 // Retrieve the contents of the shared file.
334 $('#editor').trumbowyg('disable'); 336 $('#editor').trumbowyg('disable');
335 $.post('text.php', 337 $.post('text.php',
336 { 338 {
337 timestamp: window.performance.now(), 339 timestamp: window.performance.now(),
338 fingerprint: fingerprint, 340 fingerprint: fingerprint,
339 action: 'LOAD' 341 action: 'LOAD'
340 }).done((data) => {; 342 }).done((data) => {;
341 $('#trumbowyg') 343 $('#trumbowyg')
342 .trumbowyg('html', data); 344 .trumbowyg('html', data);
343 $('#trumbowyg').trumbowyg('enable'); 345 $('#trumbowyg').trumbowyg('enable');
344 $('#trumbowyg').show(); 346 $('#trumbowyg').show();
345 if(fingerprint == nick) 347 if(fingerprint == nick)
346 $('#home-icon').addClass("text-success").removeClass("text-danger"); 348 $('#home-icon').addClass("text-success").removeClass("text-danger");
347 else 349 else
348 $('#home-icon').addClass("text-danger").removeClass("text-success"); 350 $('#home-icon').addClass("text-danger").removeClass("text-success");
349 }).fail(() => { 351 }).fail(() => {
350 $('#trumbowyg').trumbowyg('enable'); 352 $('#trumbowyg').trumbowyg('enable');
351 $('#trumbowyg').show(); 353 $('#trumbowyg').show();
352 }); 354 });
353 }); 355 });
354 }); 356 });
355 }); 357 });
356 </script> 358 </script>
357 </body> 359 </body>
358 </html> 360 </html>
359   361