Adding a Copy Button to Code Blocks

from blog ttntm.me - Blog, | ↗ original
Copying code from code blocks, without having to manually select it all first, is very handy convenience feature. But despite having published a ton of code snippets on this website, adding copy functionality wasn’t a top priority so far. A bit sad, considering that it can be done in less than an hour, using only 61 lines of vanilla JavaScript...