Skip to content

DoctorLai/simple-qr-code

Repository files navigation

Offline QR Code Generator/Editor

A fast, ads-free, fully offline Chrome extension that turns the current tab URL - or any selected text - into a QR code you can edit and download.

CI Node.js Manifest V3 Chrome Web Store Users Rating License: MIT PRs Welcome Code style: Prettier Last commit Issues Stars Privacy Policy

Popup screenshot image image

Features

  • 100% offline & fast - QR codes are generated locally with qrcode.js; no network requests, ever.
  • One click - open the popup to instantly get a QR code for the current tab URL.
  • Context-menu support - select any text on a page, right-click, and choose "Create QR Code from Selection or Tab URL" to open the popup pre-filled with that text.
  • Inline editing - edit QR text directly in the popup without modal prompts.
  • Download as PNG - save generated QR images from the popup.
  • Copy QR text - copy the current popup text back to your clipboard.
  • Keyboard shortcut - press Alt+Shift+Q to open the popup without reaching for the mouse (re-bind it at chrome://extensions/shortcuts).
  • Custom QR colors - pick any foreground and background color from the options page, with a live preview.
  • Light, dark & auto themes - choose a theme in the options, or let it follow your system automatically.
  • Clean, ads-free UI - no author links, no tracking, no nonsense.
  • Localized store listing - the extension name and description ship in 25 Chrome locales, including English, Chinese, Arabic, Bengali, German, Spanish, French, Hindi, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Tamil, Telugu, Thai, Turkish, and Vietnamese.

Install

From the Chrome Web Store (recommended)

Install Offline QR Code Generator/Editor

Load the unpacked extension (for development)

  1. Clone this repository.
  2. Open chrome://extensions in Chrome.
  3. Toggle Developer mode (top-right).
  4. Click Load unpacked and select the simple-qr-code/ folder.

Usage

  • Tab URL to QR: click the toolbar icon. The popup shows a QR code for the current page and updates live as you edit the text. Copy the text, reset to the tab URL, or download the PNG.
  • Selected text to QR: highlight text on any page, right-click, and choose "Create QR Code from Selection or Tab URL". The popup opens pre-filled with the selected text; if nothing is selected, it uses the current tab URL.
  • Customize colors & theme: open the extension Options to set the QR foreground/background colors and choose an Auto / Light / Dark theme.
  • Keyboard shortcut: press Alt+Shift+Q (configurable at chrome://extensions/shortcuts) to open the popup for the current tab.
  • Hide the context menu: open the extension Options and tick "Hide context menu".

Permissions

This extension asks for the minimum it needs and collects no data:

Permission Why it is needed
activeTab Read the current tab's URL when you open the popup or context menu.
storage Save your preferences (theme, QR colors, context-menu visibility).
contextMenus Add the right-click "Create QR Code" menu item.

Privacy

This extension is fully offline and collects no data - no network requests, no analytics, no tracking, no ads. The only things it stores are your own preferences (theme, QR colors, and context-menu visibility). See the full Privacy Policy for details.

Development

Requires Node.js >= 18.

npm install        # install dev tooling
npm run check      # lint + format check + tests with coverage threshold
npm run build      # package dist/simple-qr-code-v<version>.zip for the Web Store
Script Description
npm run lint Lint with ESLint
npm run lint:fix Lint and auto-fix
npm run format Format with Prettier
npm run format:check Verify formatting
npm test Run Jest unit tests
npm run coverage Run tests and enforce the coverage threshold
npm run check Lint + format check + coverage
npm run build Build the Chrome Web Store zip into dist/
npm run ci check followed by build

See CONTRIBUTING.md for the full workflow.

Project structure

simple-qr-code/        # the unpacked extension (manifest.json at its root)
  js/
    context.js         # MV3 background service worker (context menu)
    qr.js              # popup editor, Copy Text, Download PNG
    lib/qrutils.js     # pure, unit-tested helpers
  _locales/            # i18n message catalogs
  images/              # icons
scripts/build.js       # packages the extension into dist/*.zip
test/                  # Jest unit tests

Contributing

Contributions are welcome! Please read CONTRIBUTING.md and run npm run check before opening a pull request.

Support / Sponsor

If this extension is useful to you, consider buying the author a coffee:

License

MIT (c) Zhihua Lai (justyy)

Resources