File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ document.addEventListener('DOMContentLoaded', function () {
5656
5757 return input
5858 }
59-
59+
6060 var copyToClipboard = function ( code , language ) {
6161 var textarea = document . createElement ( 'textarea' )
6262 textarea . value = cleanCode ( code , language )
@@ -82,14 +82,14 @@ document.addEventListener('DOMContentLoaded', function () {
8282 }
8383
8484 // capture copy command
85- let copyThis = document . querySelectorAll ( " pre code" )
85+ const copyThis = document . querySelectorAll ( ' pre code' )
8686 copyThis . forEach ( ( code ) => {
87- code . addEventListener ( " copy" , ( e ) => {
88- const selection = document . getSelection ( ) ;
89- e . clipboardData . setData ( " text/plain" , cleanCallouts ( selection . toString ( ) ) )
87+ code . addEventListener ( ' copy' , ( e ) => {
88+ const selection = document . getSelection ( )
89+ e . clipboardData . setData ( ' text/plain' , cleanCallouts ( selection . toString ( ) ) )
9090 e . preventDefault ( )
91- } ) ;
92- } ) ;
91+ } )
92+ } )
9393
9494 function capitalizeFirstLetter ( string ) {
9595 return string . charAt ( 0 ) . toUpperCase ( ) + string . slice ( 1 )
You can’t perform that action at this time.
0 commit comments