一旦コメントアウト
This commit is contained in:
parent
07fd2de204
commit
2ae55f181b
1 changed files with 9 additions and 9 deletions
|
@ -59,15 +59,15 @@
|
|||
return ()=>{window.removeEventListener('hashchange', hashChange)}
|
||||
})
|
||||
|
||||
// copy code
|
||||
onMount(()=>{
|
||||
document.getElementById('blog')?.addEventListener('click',(e:MouseEvent)=>{
|
||||
if (e.target instanceof HTMLElement && e.target.matches('pre')) {
|
||||
let code = e.target.textContent || '';
|
||||
navigator.clipboard.writeText(code)
|
||||
}
|
||||
})
|
||||
})
|
||||
// // copy code
|
||||
// onMount(()=>{
|
||||
// document.getElementById('blog')?.addEventListener('click',(e:MouseEvent)=>{
|
||||
// if (e.target instanceof HTMLElement && e.target.matches('pre')) {
|
||||
// let code = e.target.textContent || '';
|
||||
// navigator.clipboard.writeText(code)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
</script>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue