siggame / webserver

THIS IS NO LONGER THE WEBSERVER: see https://github.com/siggame/ophelia
Other
7 stars 3 forks source link

Copy git clone command to clipboard button #139

Open JacobFischer opened 8 years ago

JacobFischer commented 8 years ago

It would be nice to have a "Copy to Clipboard" button next to the Help > View Clone Command just like on GitHub.

Example: image

(Obviously make a better looking button than the one I stole from github)

michaelwisely commented 8 years ago

The only way I've seen that done is with some gross Flash stuff. If there's a proper JS way to do it, I'd be game, but no spooky Flash wrappers.

jonsimington commented 8 years ago

I used this at work. Just attach it to any div and you can trigger the copy onclick of a button, or automatically when you open the modal via an event.