finds.dev← search

// the find

mojombo/clippy

★ 938 · MIT · updated Oct 2011

Clippy is a very simple Flash widget that makes it possible to place arbitrary text onto the client's clipboard.

A Flash-based clipboard widget from 2009 that lets you put a copy button on any web page. Tom Preston-Werner built this for GitHub back when `document.execCommand('copy')` didn't exist yet. It is a historical artifact.

- Solved a real problem cleanly for its era — Flash was the only cross-browser way to write to the clipboard in 2009

- Tiny scope: one .swf, one helper method, done. No framework, no dependencies beyond Flash Player

- HaXe source is included so you could actually understand and modify it, not just consume a black-box binary

- Flash Player reached end-of-life in December 2020 and is blocked by every modern browser — this widget is completely non-functional today

- Last commit is October 2011, nearly 15 years ago, and the project was abandoned well before Flash died

- The Clipboard API (`navigator.clipboard.writeText()`) has been available since Chrome 66 / Firefox 63 — there is no reason this approach exists anymore

- The Rails helper embeds text directly into a Flash parameter with no escaping, which would be an XSS vector if this were somehow still running

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →