@@ -143,21 +143,11 @@ function web_editor(config) {
143143 // Indicates if there are unsaved changes to the content of the editor.
144144 var dirty = false ;
145145
146- // Sets the description associated with the code displayed in the UI.
147- function setDescription ( x ) {
148- $ ( "#script-description" ) . text ( x ) ;
149- }
150-
151146 // Sets the name associated with the code displayed in the UI.
152147 function setName ( x ) {
153148 $ ( "#script-name" ) . val ( x ) ;
154149 }
155150
156- // Gets the description associated with the code displayed in the UI.
157- function getDescription ( ) {
158- return $ ( "#script-description" ) . text ( ) ;
159- }
160-
161151 // Gets the name associated with the code displayed in the UI.
162152 function getName ( ) {
163153 return $ ( "#script-name" ) . val ( ) ;
@@ -276,21 +266,17 @@ function web_editor(config) {
276266 $ ( '#button-decrypt-link' ) . click ( function ( ) {
277267 var password = $ ( '#passphrase' ) . val ( ) ;
278268 setName ( EDITOR . decrypt ( password , message . n ) ) ;
279- setDescription ( EDITOR . decrypt ( password , message . c ) ) ;
280269 EDITOR . setCode ( EDITOR . decrypt ( password , message . s ) ) ;
281270 vex . close ( ) ;
282271 EDITOR . focus ( ) ;
283272 } ) ;
284273 } else if ( migration != null ) {
285274 setName ( migration . meta . name ) ;
286- setDescription ( migration . meta . comment ) ;
287275 EDITOR . setCode ( migration . source ) ;
288276 EDITOR . focus ( ) ;
289277 } else {
290278 // If there's no name, default to something sensible.
291279 setName ( "microbit" ) ;
292- // If there's no description, default to something sensible.
293- setDescription ( "A MicroPython script" ) ;
294280 // A sane default starting point for a new script.
295281 EDITOR . setCode ( config . translate . code . start ) ;
296282 }
@@ -428,15 +414,13 @@ function web_editor(config) {
428414 var reader = new FileReader ( ) ;
429415 if ( ext == 'py' ) {
430416 setName ( f . name . replace ( '.py' , '' ) ) ;
431- setDescription ( config . translate . drop . python ) ;
432417 reader . onload = function ( e ) {
433418 EDITOR . setCode ( e . target . result ) ;
434419 } ;
435420 reader . readAsText ( f ) ;
436421 EDITOR . ACE . gotoLine ( EDITOR . ACE . session . getLength ( ) ) ;
437422 } else if ( ext == 'hex' ) {
438423 setName ( f . name . replace ( '.hex' , '' ) ) ;
439- setDescription ( config . translate . drop . hex ) ;
440424 reader . onload = function ( e ) {
441425 var code = '' ;
442426 var showAlert = false ;
@@ -575,8 +559,6 @@ function web_editor(config) {
575559 var qs_array = [ ] ;
576560 // Name
577561 qs_array . push ( 'n=' + EDITOR . encrypt ( password , getName ( ) ) ) ;
578- // Comment
579- qs_array . push ( 'c=' + EDITOR . encrypt ( password , getDescription ( ) ) ) ;
580562 // Source
581563 qs_array . push ( 's=' + EDITOR . encrypt ( password , EDITOR . getCode ( ) ) ) ;
582564 // Hint
@@ -612,15 +594,13 @@ function web_editor(config) {
612594 var reader = new FileReader ( ) ;
613595 if ( ext == 'py' ) {
614596 setName ( file . name . replace ( '.py' , '' ) ) ;
615- setDescription ( config . translate . drop . python ) ;
616597 reader . onload = function ( e ) {
617598 EDITOR . setCode ( e . target . result ) ;
618599 } ;
619600 reader . readAsText ( file ) ;
620601 EDITOR . ACE . gotoLine ( EDITOR . ACE . session . getLength ( ) ) ;
621602 } else if ( ext == 'hex' ) {
622603 setName ( file . name . replace ( '.hex' , '' ) ) ;
623- setDescription ( config . translate . drop . hex ) ;
624604 reader . onload = function ( e ) {
625605 var code = '' ;
626606 var showAlert = false ;
0 commit comments