Skip to content

About

Replaces mysterious country codes automatically with the corresponding flag. The solution for Chromium users on Windows!

Topics

Resources

Stars

58 stars

Watchers

2 watching

Forks

Repository files navigation

Country Flag Fixer | Chromium Extension

Currently, Chromium users (using Chrome or Microsoft Edge) on Windows are not able to see the flag emoji's. A country code is shown instead. This extention will replace those abbreviations with its corresponding flag using a special font.

Download

This extention is available in the Chrome Web Store and the Microsoft Edge Add-on store!

This extention uses the Twemoji Country Flags font, which is based on Twemoji (licensed under CC BY-ND 2.0).

World icons created by turkkub - Flaticon

Privacy

See the privacy policy for details about local website processing, saved exclusions and browser-managed synchronization. The extension has no analytics or developer-controlled data collection service.

Development

Existing users upgrading from an older release to 2.1.0 see a one-time update tab with release highlights and a Settings button. The notice is tracked per device and does not appear on fresh installs, same-version reloads or later releases. A fully disabled extension cannot display it. The update page is translated into all 35 existing locales.

The project uses pnpm 12.10.1. pnpm installs a project-local Node 22 runtime; your system-wide Node installation does not need to be replaced. If installing pnpm through npm, use Node 22.13 or newer for that initial installation.

pnpm install --frozen-lockfile
pnpm run verify
pnpm audit

Load dist as an unpacked extension in chrome://extensions or edge://extensions. The production build uses src/manifest.json and src/_locales as its sources; font and icon assets come from public. Tailwind styles only the options page, using its official PostCSS plugin and scripts/build-css.cjs. After pnpm run build, click Reload on the unpacked extension and reload the test page. A ZIP is only needed for distribution.

public contains ready-to-copy binary assets: fonts and icons. Editable application files belong in src: TypeScript, options HTML/CSS, the manifest and translations. There is one translation source, src/_locales; the build copies it into dist/_locales. Generated output belongs in dist, not in either source directory.

Code comments explain decisions such as observer-loop prevention, font restoration and hostname matching; blank lines separate logical steps.

Open the extension's options page to manage ignored domains. An entry applies to that hostname and its subdomains, including embedded content on its pages. Reload existing pages after changing the list. Settings are saved in browser sync storage using the existing cfIgnoredSites key.

Click the extension's toolbar icon to ignore the current hostname or remove its exclusion. Reload the page afterwards. If a parent domain already excludes the website, the popup explains this and links to Settings rather than removing a broader exclusion. Popup text is translated into all 35 existing locales.

Rendering limits

The extension handles flag sequences in DOM text, including dynamic updates and open shadow roots found during initialization or subtree processing. It leaves editable content alone, using HTML semantics rather than editor-specific class names. Canvas-rendered text, closed shadow roots, CSS-generated flags, and browser-restricted pages are not covered. A shadow root attached later to an unchanged host is discovered on its next observed subtree change. designMode changes reconcile on the next relevant DOM mutation. CSSOM-only stylesheet edits and viewport/media changes without a DOM mutation are not observed. Flags split across separate text nodes are not joined.

Pull request checks

GitHub Actions builds and tests each pull request and push on Windows in Chrome and Edge, and audits dependencies. See tests/README.md for the test layers.

About

Replaces mysterious country codes automatically with the corresponding flag. The solution for Chromium users on Windows!

Topics

Resources

Stars

58 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages