File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ const loadCopyButton = () => {
3434 let timeout = null
3535 // define the behavior of the button when it's clicked
3636 return event => {
37- clearTimeout ( timeout )
38- const buttonEl = event . currentTarget
39- const codeEl = buttonEl . nextElementSibling
40- navigator . clipboard . writeText ( getCopyableText ( codeEl ) )
41- buttonEl . innerText = _ ( "Copied!" )
42- timeout = setTimeout ( ( ) => {
43- buttonEl . innerText = _ ( "Copy" )
44- } , 1500 )
37+ clearTimeout ( timeout )
38+ const buttonEl = event . currentTarget
39+ const codeEl = buttonEl . nextElementSibling
40+ navigator . clipboard . writeText ( getCopyableText ( codeEl ) )
41+ buttonEl . innerText = _ ( "Copied!" )
42+ timeout = setTimeout ( ( ) => {
43+ buttonEl . innerText = _ ( "Copy" )
44+ } , 1500 )
4545 }
4646 }
4747
You can’t perform that action at this time.
0 commit comments