File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const textarea = document.getElementById('textarea')
33
44textarea . focus ( )
55
6- function createTags ( input ) {
6+ const createTags = ( input ) => {
77 const tags = input . split ( ',' ) . filter ( tag => tag . trim ( ) !== '' ) . map ( tag => tag . trim ( ) )
88 tagsEl . innerHTML = ''
99 tags . forEach ( tag => {
@@ -15,20 +15,20 @@ function createTags(input){
1515 } ) ;
1616}
1717
18- function pickRandomTag ( ) {
18+ const pickRandomTag = ( ) => {
1919 const tags = document . querySelectorAll ( '.tag' )
2020 return tags [ Math . floor ( Math . random ( ) * tags . length ) ]
2121}
2222
23- function highlightTag ( tag ) {
23+ const highlightTag = ( tag ) => {
2424 tag . classList . add ( 'highlight' )
2525}
2626
27- function unHighlightTag ( tag ) {
27+ const unHighlightTag = ( tag ) => {
2828 tag . classList . remove ( 'highlight' )
2929}
3030
31- function randomSelect ( ) {
31+ const randomSelect = ( ) => {
3232 const times = 30
3333 const interval = setInterval ( ( ) => {
3434 const randomTag = pickRandomTag ( )
You can’t perform that action at this time.
0 commit comments