File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,6 @@ export default async function ({ feature, console }) {
2323 return textWidth ;
2424 }
2525
26- function clearCenterAlignment ( textarea ) {
27- const lines = textarea . value . split ( "\n" ) ;
28- const uncenteredLines = lines . map ( ( line ) => {
29- return line . replace ( / ^ \s + / , "" ) ;
30- } ) ;
31- textarea . value = uncenteredLines . join ( "\n" ) ;
32- }
33-
3426 function centerAlignText ( ) {
3527 const form = document . querySelector ( ".project-description-form" ) ;
3628 if ( form ) {
@@ -39,8 +31,6 @@ export default async function ({ feature, console }) {
3931 activeElement . tagName === "TEXTAREA" &&
4032 form . contains ( activeElement )
4133 ) {
42- clearCenterAlignment ( activeElement ) ;
43-
4434 const spaceWidth = getSpaceWidth ( ) ;
4535 const lines = activeElement . value . split ( "\n" ) ;
4636 const centeredLines = lines . map ( ( line ) => {
@@ -59,16 +49,4 @@ export default async function ({ feature, console }) {
5949 centerAlignText ( ) ;
6050 }
6151 } ) ;
62-
63- await ScratchTools . waitForElements (
64- ".project-description-form textarea" ,
65- ( textareas ) => {
66- textareas . forEach ( ( textarea ) => {
67- textarea . addEventListener ( "input" , function ( ) {
68- centerAlignText ( ) ;
69- } ) ;
70- } ) ;
71- }
72- ) ;
7352}
74-
You can’t perform that action at this time.
0 commit comments