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')
3
3
4
4
textarea . focus ( )
5
5
6
- function createTags ( input ) {
6
+ const createTags = ( input ) => {
7
7
const tags = input . split ( ',' ) . filter ( tag => tag . trim ( ) !== '' ) . map ( tag => tag . trim ( ) )
8
8
tagsEl . innerHTML = ''
9
9
tags . forEach ( tag => {
@@ -15,20 +15,20 @@ function createTags(input){
15
15
} ) ;
16
16
}
17
17
18
- function pickRandomTag ( ) {
18
+ const pickRandomTag = ( ) => {
19
19
const tags = document . querySelectorAll ( '.tag' )
20
20
return tags [ Math . floor ( Math . random ( ) * tags . length ) ]
21
21
}
22
22
23
- function highlightTag ( tag ) {
23
+ const highlightTag = ( tag ) => {
24
24
tag . classList . add ( 'highlight' )
25
25
}
26
26
27
- function unHighlightTag ( tag ) {
27
+ const unHighlightTag = ( tag ) => {
28
28
tag . classList . remove ( 'highlight' )
29
29
}
30
30
31
- function randomSelect ( ) {
31
+ const randomSelect = ( ) => {
32
32
const times = 30
33
33
const interval = setInterval ( ( ) => {
34
34
const randomTag = pickRandomTag ( )
You can’t perform that action at this time.
0 commit comments