User:Nardog/CopyCodeBlock

This script adds a button at the top right corner of each code block (created in wikitext via , , or a line beginning with a space, or the entirety of a Lua, CSS, or JavaScript page) that only shows up when your mouse cursor is inside the block and copies the content of the block when clicked.

Installation
Add the following to your common.js or global.js:

Or you may enable the script installer in and click "Install" in the infobox on this page.