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 = () => {
34
34
let timeout = null
35
35
// define the behavior of the button when it's clicked
36
36
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 )
45
45
}
46
46
}
47
47
You can’t perform that action at this time.
0 commit comments