Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the Copy buttons in docs when Flash is not available #16269

Closed
tarebyte opened this issue Apr 10, 2015 · 9 comments
Closed

Hide the Copy buttons in docs when Flash is not available #16269

tarebyte opened this issue Apr 10, 2015 · 9 comments
Labels
Milestone

Comments

@tarebyte
Copy link
Contributor

Hi There,

I'm opening up an issue before making a pull request to see if this was something that people might want.
I would like to hide the the copy button for the code snippets when the browser doesn't support flash.

Here is a before and after:
screen shot 2015-04-09 at 20 17 25

screen shot 2015-04-09 at 20 16 16

I don't think it takes away from the design at all, and it would be really useful for people like me who use Firefox and don't have flash installed.

Thanks!

@cvrebert cvrebert added the docs label Apr 10, 2015
@cvrebert cvrebert changed the title Thoughts on hiding the copy button in docs when flash is not available Hide the Copy buttons in docs when Flash is not available Apr 10, 2015
@cvrebert
Copy link
Collaborator

Sounds perfectly reasonable.

@patrickhlauke
Copy link
Member

LGTM. maybe a nice addition would be to explore the possibility of using the clipboard API http://www.w3.org/TR/clipboard-apis/ where supported, and ditch the flash thing altogether?

@tarebyte
Copy link
Contributor Author

@patrickhlauke, @JamesMGreene had some thoughts on it in zeroclipboard/zeroclipboard#171.

From what I've read it doesn't sound like it's super feasible right now for a lot of browsers (http://caniuse.com/#feat=clipboard).

@JamesMGreene
Copy link

Sadly correct: the HTML Clipboard API is still basically unimplemented in all browsers, minus a few that support only its "paste" event.

Believe me... when it's available in ANY browser, ZeroClipboard will be utilizing it as the first-class approach ASAP and demoting our Flash bits to second-class (fallback).

@cvrebert
Copy link
Collaborator

@tarebyte Anyway, we'd welcome a pull request.

@JamesMGreene
Copy link

You guys may be interested in my comment on zeroclipboard/zeroclipboard#552. Feedback is always welcomed.

@tarebyte
Copy link
Contributor Author

@cvrebert this may seem like a silly question, but how are you minifying your JS for the docs?

@cvrebert
Copy link
Collaborator

@tarebyte Via an UglifyJS Grunt task:

dest: 'docs/assets/js/docs.min.js'

@tarebyte
Copy link
Contributor Author

@cvrebert awesome thanks! I was look at the gh-pages branch and skipped right through the README. I'll get started on the PR.

@cvrebert cvrebert added this to the v3.3.5 milestone Apr 17, 2015
cvrebert pushed a commit that referenced this issue Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants