prefix.cc icon indicating copy to clipboard operation
prefix.cc copied to clipboard

Implement easy copy-to-clipboard without Flash

Open cygri opened this issue 12 years ago • 2 comments

Google Analytics says that ~10% of prefix.cc users don't have Flash enabled. The current clipboard copying code requires Flash.

An approach to getting stuff into the clipboard without Flash is shown here (pointed out by @tomayak): http://stackoverflow.com/questions/17527870/how-does-trello-access-the-users-clipboard

Using this approach, when the user is on a page like http://prefix.cc/skos or http://prefix.cc/skos,dc.sparql, then pressing ⌘+C / Ctrl+C could copy the URI or snippet to the clipboard.

Perhaps the clipboard icon should appear even on flashless browsers, and clicking it should show a message: “To copy the URI/snippet to the clipboard, simply press ⌘+C / Ctrl+C.” (On browsers with Flash, the message could still appear but read: “To copy this, you may also simply…”

cygri avatar Aug 14 '13 21:08 cygri

10% is a lot… how many of them are mobile users? (For them, it wouldn't matter anyway I guess.)

I just wonder how to define the behavior in general. For instance, what gets copied on http://prefix.cc/dc,foaf?

RubenVerborgh avatar Aug 14 '13 22:08 RubenVerborgh

We degrade quite gracefully here, so I'm not really worried about the 10%. The true reason for implementing this would be perfection for perfection's sake ;-)

In the case of http://prefix.cc/dc,foaf (a table of multiple mappings), it should perhaps copy a simple text version, like this: http://prefix.cc/dc,foaf.file.txt In the case of http://prefix.cc/dc (multiple candidate URIs), it should simply copy the first.

cygri avatar Aug 14 '13 23:08 cygri