I love this! Especially how single-line code blocks have a hover-to-reveal copy code button. Very handy.
My only additional desire as an entitled American (\sarcam, kinda) is to have options for English hover-over tooltips etc; or otherwise refactor it to be language agnostic.
Anyway, I like it a lot! Thanks for putting this together.
I don’t think any feedback is necessary. This is a perfect little tool. I’ve had many wikis over the years that could have used this. And first thing Monday morning, I expect to add this to two wikis in progress.
One thing I noticed was that the only-appears-when-hovering copy button on the inline code, appears when you hover over the area where the button will appears.
To use the example from your own live demo, this means I cannot click on the word “in” after console.log() and begin a selection of text. If that character space was instead a link, it’s rendered unclickable
I’d suggest either the hover area to make the button appear strictly be the inline code only (till the button appears when obv you need to get to the button!), or the button appear over the code - which is my preference as that matches the block code style too.
Very nice plugin. I wonder if it could be done in pure wikitext, like @vilc’s Copy code button. They are roughly on par, but the Copy Code Button does not have on hover on inline <code> spans (i.e. anything with backticks) like yours does.