Skip to content

Commit ddde1ca

Browse files
fix: _includes/Help cleanup ( Fixes #331 )
Putting the element a bit higher in the hierarchy allows the copy to work
1 parent 42c399c commit ddde1ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

psturtle.com/_includes/Help.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ Write-Progress @progress
266266
document.querySelectorAll('pre > code').forEach(element => {
267267
const copyCodeButton = document.createElement('div')
268268
copyCodeButton.classList.add('copy-button')
269-
copyCodeButton.onclick = () => navigator.clipboard.writeText(element.innerText)
269+
copyCodeButton.onclick = () => navigator.clipboard.writeText(element.innerText)
270270
copyCodeButton.innerHTML = ``$(. $site.includes.Feather -Icon 'clipboard')``
271-
element.parentNode.parentNode.prepend(copyCodeButton)
271+
element.parentNode.prepend(copyCodeButton)
272272
});
273273
</script>
274274
"@

0 commit comments

Comments
 (0)