@@ -126,21 +126,11 @@ function web_editor(config) {
126126 // Indicates if there are unsaved changes to the content of the editor.
127127 var dirty = false ;
128128
129- // Sets the description associated with the code displayed in the UI.
130- function setDescription ( x ) {
131- $ ( "#script-description" ) . text ( x ) ;
132- }
133-
134129 // Sets the name associated with the code displayed in the UI.
135130 function setName ( x ) {
136131 $ ( "#script-name" ) . text ( x ) ;
137132 }
138133
139- // Gets the description associated with the code displayed in the UI.
140- function getDescription ( ) {
141- return $ ( "#script-description" ) . text ( ) ;
142- }
143-
144134 // Gets the name associated with the code displayed in the UI.
145135 function getName ( ) {
146136 return $ ( "#script-name" ) . text ( ) ;
@@ -240,21 +230,17 @@ function web_editor(config) {
240230 $ ( '#button-decrypt-link' ) . click ( function ( ) {
241231 var password = $ ( '#passphrase' ) . val ( ) ;
242232 setName ( EDITOR . decrypt ( password , message . n ) ) ;
243- setDescription ( EDITOR . decrypt ( password , message . c ) ) ;
244233 EDITOR . setCode ( EDITOR . decrypt ( password , message . s ) ) ;
245234 vex . close ( ) ;
246235 EDITOR . focus ( ) ;
247236 } ) ;
248237 } else if ( migration != null ) {
249238 setName ( migration . meta . name ) ;
250- setDescription ( migration . meta . comment ) ;
251239 EDITOR . setCode ( migration . source ) ;
252240 EDITOR . focus ( ) ;
253241 } else {
254242 // If there's no name, default to something sensible.
255- setName ( "microbit" ) ;
256- // If there's no description, default to something sensible.
257- setDescription ( "A MicroPython script" ) ;
243+ setName ( "microbit" )
258244 // A sane default starting point for a new script.
259245 EDITOR . setCode ( config . translate . code . start ) ;
260246 }
@@ -392,15 +378,13 @@ function web_editor(config) {
392378 var reader = new FileReader ( ) ;
393379 if ( ext == 'py' ) {
394380 setName ( f . name . replace ( '.py' , '' ) ) ;
395- setDescription ( config . translate . drop . python ) ;
396381 reader . onload = function ( e ) {
397382 EDITOR . setCode ( e . target . result ) ;
398383 } ;
399384 reader . readAsText ( f ) ;
400385 EDITOR . ACE . gotoLine ( EDITOR . ACE . session . getLength ( ) ) ;
401386 } else if ( ext == 'hex' ) {
402387 setName ( f . name . replace ( '.hex' , '' ) ) ;
403- setDescription ( config . translate . drop . hex ) ;
404388 reader . onload = function ( e ) {
405389 var code = upyhex . extractPyStrFromIntelHex (
406390 e . target . result ) ;
@@ -533,7 +517,6 @@ function web_editor(config) {
533517 // Name
534518 qs_array . push ( 'n=' + EDITOR . encrypt ( password , getName ( ) ) ) ;
535519 // Comment
536- qs_array . push ( 'c=' + EDITOR . encrypt ( password , getDescription ( ) ) ) ;
537520 // Source
538521 qs_array . push ( 's=' + EDITOR . encrypt ( password , EDITOR . getCode ( ) ) ) ;
539522 // Hint
@@ -569,15 +552,13 @@ function web_editor(config) {
569552 var reader = new FileReader ( ) ;
570553 if ( ext == 'py' ) {
571554 setName ( file . name . replace ( '.py' , '' ) ) ;
572- setDescription ( config . translate . drop . python ) ;
573555 reader . onload = function ( e ) {
574556 EDITOR . setCode ( e . target . result ) ;
575557 } ;
576558 reader . readAsText ( file ) ;
577559 EDITOR . ACE . gotoLine ( EDITOR . ACE . session . getLength ( ) ) ;
578560 } else if ( ext == 'hex' ) {
579561 setName ( file . name . replace ( '.hex' , '' ) ) ;
580- setDescription ( config . translate . drop . hex ) ;
581562 reader . onload = function ( e ) {
582563 var code = upyhex . extractPyStrFromIntelHex ( e . target . result ) ;
583564 if ( code . length < 8192 ) {
0 commit comments