-
-
Notifications
You must be signed in to change notification settings - Fork 167
GitHub copy code snippet
Rob Garrison edited this page Oct 24, 2022
·
17 revisions
A userscript adds a copy to clipboard button on hover of markdown code snippets
- A button is added each
pre
formatted code block in markdown pages. - Clicking the button will copy the contents of the code block to the clipboard.
- Buttons are not added to subdomains of GitHub, e.g. help.github.com, because the clipboard script is not loaded on those pages by default.
- Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.
- Update dependencies
- Copy code snippet now only enabled for Gists.
- Update mutation script.
- Update mutation script.
- Remove blue class. Closes issue #119.
- Update GitHub icon.
- Update mutation script.
- Update mutation script.
- Update mutation script.
- Update mutation script.
- Use new clipboard-copy element.
- Target all code in comments.
- Update mutation script url.
- Stop using
:any
selector (See https://caniuse.com/#feat=css-matches-pseudo).
- Fix compatibility with GitHub Toggle Code Wrap userscript. Fixes issue #35.
- Code blocks are no longer wrapped. Fixes issue #35.
- Initial commit