Skip to content

Browser extension that shows country flag 🚩 for the current tab domain

Notifications You must be signed in to change notification settings

falsefalse/yaf-extension

Repository files navigation

Yet Another Flags 🇺🇦

coverage

Minimalistic web extension that shows country flag for the current tab domain. Available for Chrome and Firefox.

Extension uses free MaxMind City DB for geo location, and Google DoH for localized DNS resolution.

Take a look at server code as well.

Prerequisites

Requires node@18, yarn@1.22 and jake.

npm -g install yarn jake [prettier]
yarn install
Why not npm?

Because of the lock file size — yarn.lock is three times smaller. See 037b18f 🐈

I don't want global jake

No problem, you can link local package or npx your way to glory 🐈

Development

# development build: un-minified, points to http://localhost:8080
jake -q [firefox]

# production build: minified, points to https://geoip.furman.im
jake -q release[:firefox]

yarn test # specs
yarn coverage # generate coverage
yarn report # compile html report and open it in the default browser

Run development build

  • open chrome://extensions/, turn on "Developer mode"
  • click "Load unpacked"
  • navigate to ./pkg and pick manifest.json

Don't forget to reload the extension in the browser when rebuilding.

SublimeText build system

SublimeText users get the benefit of ready-made build tasks (requires Terminus).

Open extension.sublime-project as a Project and press Cmd+Shift+B.

tc 🦜, lint 🕵 and test 🧪 tasks have navigable output.

Release

  1. bump version in package.json
  2. add CHANGELOG.md entry
  3. git commit -am "Bump"
    
    yarn release
    # - upload pkg to webstore, submit draft for review
    
    yarn release:firefox
    # - upload pkg and pkg-src to AMO
    
    yarn release:tag