4

Screenshot

  • Dark Mode

userscript preview - dark mode

  • Light Mode

userscript preview - light mode

About

This is a userscript to copy code (from any <pre> element) to the clipboard from all Stack Exchange sites. It's pretty nice and cool to be able to copy the code faster, rather than manually selecting it all then Ctrl + C.

Download

It's all hosted on GitHub Gists, no need for a whole repository.

Direct Link: Unminfied - Minified.

Gists: Unminfied - Minified.

Compatibility

The userscript should work across all modern browsers and all userscripts managers.

Every time a code is copied, either a confirmation message is written to the console or an error message, so be sure to check if you meet any problems. It's all done using the Clipboard API.

Contact and issues

If you meet any problem, it's best to write an answer below with a screenshot of the problem, browser version, userscript manager name, and version for testing purposes.

Feature requests are also welcome, but I tried to make the userscript work for all people.

Contributing is also welcome if you have better ways to do the same exact thing, or if you can save 1 or 2 lines.

0

You must log in to answer this question.

Browse other questions tagged .