Comment 0 for bug 1513665

Revision history for this message
Aaron Wells (u-aaronw) wrote : Replace zeroclipboard with a non-flash alternative

On the Secret URLs page, we added the zeroclipboard library to allow users to click a clipboard icon and have the URL copied to their clipboard. Unfortunately, since then Flash has started dying in a bad way, and now this sort of Flash-based clipboard widget is on the way out, and can cause browsers to pop up warning messages and such.

Now, there is no way to accomplish exactly this same functionality (copy to clipboard) without Flash currently. But, there are some useable alternatives. The one that seems to be poised to replace the click-to-copy pattern, is that you click and it automatically selects the full text, so that you then just have to hit "control-C" instead of first dragging to select it all.

Jen recently added this little clipboard library to the styleguide.php script. It works pretty good, so we may as well adopt it for the Secret URL screen as well.

http://zenorocha.github.io/clipboard.js/