@@ -143,21 +143,11 @@ function web_editor(config) {
143
143
// Indicates if there are unsaved changes to the content of the editor.
144
144
var dirty = false ;
145
145
146
- // Sets the description associated with the code displayed in the UI.
147
- function setDescription ( x ) {
148
- $ ( "#script-description" ) . text ( x ) ;
149
- }
150
-
151
146
// Sets the name associated with the code displayed in the UI.
152
147
function setName ( x ) {
153
148
$ ( "#script-name" ) . val ( x ) ;
154
149
}
155
150
156
- // Gets the description associated with the code displayed in the UI.
157
- function getDescription ( ) {
158
- return $ ( "#script-description" ) . text ( ) ;
159
- }
160
-
161
151
// Gets the name associated with the code displayed in the UI.
162
152
function getName ( ) {
163
153
return $ ( "#script-name" ) . val ( ) ;
@@ -276,21 +266,17 @@ function web_editor(config) {
276
266
$ ( '#button-decrypt-link' ) . click ( function ( ) {
277
267
var password = $ ( '#passphrase' ) . val ( ) ;
278
268
setName ( EDITOR . decrypt ( password , message . n ) ) ;
279
- setDescription ( EDITOR . decrypt ( password , message . c ) ) ;
280
269
EDITOR . setCode ( EDITOR . decrypt ( password , message . s ) ) ;
281
270
vex . close ( ) ;
282
271
EDITOR . focus ( ) ;
283
272
} ) ;
284
273
} else if ( migration != null ) {
285
274
setName ( migration . meta . name ) ;
286
- setDescription ( migration . meta . comment ) ;
287
275
EDITOR . setCode ( migration . source ) ;
288
276
EDITOR . focus ( ) ;
289
277
} else {
290
278
// If there's no name, default to something sensible.
291
279
setName ( "microbit" ) ;
292
- // If there's no description, default to something sensible.
293
- setDescription ( "A MicroPython script" ) ;
294
280
// A sane default starting point for a new script.
295
281
EDITOR . setCode ( config . translate . code . start ) ;
296
282
}
@@ -428,15 +414,13 @@ function web_editor(config) {
428
414
var reader = new FileReader ( ) ;
429
415
if ( ext == 'py' ) {
430
416
setName ( f . name . replace ( '.py' , '' ) ) ;
431
- setDescription ( config . translate . drop . python ) ;
432
417
reader . onload = function ( e ) {
433
418
EDITOR . setCode ( e . target . result ) ;
434
419
} ;
435
420
reader . readAsText ( f ) ;
436
421
EDITOR . ACE . gotoLine ( EDITOR . ACE . session . getLength ( ) ) ;
437
422
} else if ( ext == 'hex' ) {
438
423
setName ( f . name . replace ( '.hex' , '' ) ) ;
439
- setDescription ( config . translate . drop . hex ) ;
440
424
reader . onload = function ( e ) {
441
425
var code = '' ;
442
426
var showAlert = false ;
@@ -575,8 +559,6 @@ function web_editor(config) {
575
559
var qs_array = [ ] ;
576
560
// Name
577
561
qs_array . push ( 'n=' + EDITOR . encrypt ( password , getName ( ) ) ) ;
578
- // Comment
579
- qs_array . push ( 'c=' + EDITOR . encrypt ( password , getDescription ( ) ) ) ;
580
562
// Source
581
563
qs_array . push ( 's=' + EDITOR . encrypt ( password , EDITOR . getCode ( ) ) ) ;
582
564
// Hint
@@ -612,15 +594,13 @@ function web_editor(config) {
612
594
var reader = new FileReader ( ) ;
613
595
if ( ext == 'py' ) {
614
596
setName ( file . name . replace ( '.py' , '' ) ) ;
615
- setDescription ( config . translate . drop . python ) ;
616
597
reader . onload = function ( e ) {
617
598
EDITOR . setCode ( e . target . result ) ;
618
599
} ;
619
600
reader . readAsText ( file ) ;
620
601
EDITOR . ACE . gotoLine ( EDITOR . ACE . session . getLength ( ) ) ;
621
602
} else if ( ext == 'hex' ) {
622
603
setName ( file . name . replace ( '.hex' , '' ) ) ;
623
- setDescription ( config . translate . drop . hex ) ;
624
604
reader . onload = function ( e ) {
625
605
var code = '' ;
626
606
var showAlert = false ;
0 commit comments