File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,9 +114,9 @@ export class DropDownMenu {
114114
115115 static _sanitizeMenuItemTitle ( pTitle ) {
116116 return pTitle .
117- replaceAll ( " " , Character . NO_BREAK_SPACE ) .
118- replaceAll ( "-" , Character . NON_BREAKING_HYPHEN ) .
119- replaceAll ( "..." , Character . HORIZONTAL_ELLIPSIS ) ;
117+ replace ( / / g , Character . NO_BREAK_SPACE ) .
118+ replace ( / - / g , Character . NON_BREAKING_HYPHEN ) .
119+ replace ( / [ . ] [ . ] [ . ] / g , Character . HORIZONTAL_ELLIPSIS ) ;
120120 }
121121
122122 // Add a menu item at the end of this dropdown menu
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class GrainsPanel extends Panel {
3434 // the div is not added to the DOM yet
3535 const tr = this . div . querySelector ( "#grains-table-thead-tr" ) ;
3636 for ( const previewGrain of this . previewGrains ) {
37- const previewGrainTitle = previewGrain . replaceAll ( / [ = ] .* $ / g, "" ) ;
37+ const previewGrainTitle = previewGrain . replace ( / [ = ] .* $ / g, "" ) ;
3838 const th = Utils . createElem ( "th" , "" , previewGrainTitle ) ;
3939 tr . appendChild ( th ) ;
4040 }
@@ -138,7 +138,7 @@ export class GrainsPanel extends Panel {
138138 for ( const previewGrain of this . previewGrains ) {
139139 const td = Utils . createTd ( ) ;
140140 if ( typeof pMinionData === "object" ) {
141- const previewGrainValue = previewGrain . replaceAll ( / ^ [ ^ = ] * = / g, "" ) ;
141+ const previewGrainValue = previewGrain . replace ( / ^ [ ^ = ] * = / g, "" ) ;
142142 if ( previewGrainValue . startsWith ( "$" ) ) {
143143 // it is a json path
144144 const obj = jsonPath ( pMinionData , previewGrainValue ) ;
Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ export class Panel {
765765 txt += ", press " + Character . buttonInText ( Character . CH_PAUSE ) + " to pause" ;
766766 }
767767
768- txt = txt . replaceAll ( / ^ , / g, "" ) ;
768+ txt = txt . replace ( / ^ , / g, "" ) ;
769769
770770 this . setMsg ( txt . length > 0 ? txt : "(???)" ) ;
771771 }
You can’t perform that action at this time.
0 commit comments