Type the countries, get the flags. A single-page generator for the flag heritage meme doing the rounds on Bluesky:
Live in: 🇨🇦
Born in: 🇨🇦
Parents: 🇨🇦🇨🇦
Grandparents: 🇮🇪🇨🇦🇨🇦🇨🇦
Great grandparents: 🇮🇪🇮🇪🇵🇱🇵🇱🇨🇦🇨🇦🇨🇦🇨🇦
Been to: 🇺🇸🇲🇽🇨🇺🇨🇴🇮🇸
Live at flagme.tforster.com.
Three static files, no build step, no dependencies, no framework.
- The country catalogue is generated in the browser at load: every two-letter code from
AAtoZZis passed throughIntl.DisplayNames, and the ones the browser recognises become the list. No country data ships with the app, and it stays current with the browser's own ICU tables. - Codes are then filtered through
Intl.Locale, keeping only canonical ones. CLDR still answers to deprecated aliases —UKforGB,DDforDE,SUforRU, sixteen in all — and none of those have emoji flags, so admitting them is what turns "United Kingdom" into a broken glyph instead of a Union Jack. Kosovo is excluded for the same reason: it is the one current country with no flag emoji. - Flags are derived from the code — regional indicator pairs for countries, tag sequences for England, Scotland and Wales.
- Each row is an ARIA 1.2 combobox over a listbox: arrow keys to review, Enter to add, Escape to dismiss, Backspace to remove the last chip. Matching runs prefix, then substring, then bounded Levenshtein distance, so "united kindom" still finds the United Kingdom while "narnia" finds nothing.
- Built to WCAG 2.1 Level AA and verified with axe-core in light and dark schemes.
- Selections persist to
localStorage, and are also encoded into a?m=share link (CA-CA-CA.CA-IE.CA.CA.CA-…). - Copy writes both
text/plainandtext/htmlto the clipboard, so rich targets get "created by flagme" as a real hyperlink and plain targets get the URL inline.
npm install
npm run devDeployed to Cloudflare Workers as a static assets project. There is no Worker script — wrangler.jsonc points at ./public and the edge serves it directly.
npm run deploy