Add initial MV3 support

In order to prepare the migration towards Manifest Version 3, this
change adds a MV3 browser target for Chromium (chromium_mv3) and another
one for Edge (edge_mv3), which will build the extension using MV3.

This CL also changes several things to fix some bugs in the MV3 version
of the extension:

- Adds //src/common/actionApi.js to target |chrome.browserAction| (MV2)
  and |chrome.action| (MV3) accordingly using the version-agnostic
  object |actionApi|.
- Adds //src/common/sessionStorage.js to wrap the
  || object in the case of MV3, and polyfill it in
  the case of MV2. (The polyfill isn't perfect, since it stores the data
  under the window object of the current page, so different pages will
  have access to completely different storage areas, which are cleared
  once the page is closed, not once the extension stops running.
  However, this is fine for our case.)

As of now, the extension built with MV3 might have bugs. Thus, the MV3
variant will not be used for builds until it has been stabilized.

Bug: translateselectedtext:4

Change-Id: Ib525339c055237b32b7352c490fee86b21555ed6
9 files changed
tree: a821c1a5aa3addce2a3e1f69a37aeb3721ab710e
  1. .github/
  2. docs/
  3. playbooks/
  4. roles/
  5. src/
  6. templates/
  7. tools/
  8. .clang-format
  9. .editorconfig
  10. .gitignore
  11. .gitreview
  12. .jsbeautifyrc
  13. .zuul.yaml
  15. Makefile
  16. OWNERS
  17. package-lock.json
  18. package.json
  20. tagRelease.bash
  21. webpack.config.js


The source code of the Chrome "Translate Selected Text" extension.

Do you want to help to translate this extension's UI?

If you want to help bring this extension into your native language, you can, and I would really appreciate it! Just go to the following website and start translating :)



Please, report any bugs or feature sugestions at GitHub:

Beta version

As this extension has so many users, I've decided to upload a Beta version of the extension to the Chrome Web Store so I can test it before uploading any update to the stable version! This way I can make sure that the stable version of the extension is 100% bug-free.

If you want to test the bleeding edge of this extension before everybody else, join the Google Group and download the extension (there may be bugs, you've been warned):

Special thanks

Special thanks to:

  • All the users who use the extension every day and who trust the model of developing simple extensions which do not request any privacy-breaking permissions.
  • All the users who have contributed translations. You rock!
  • BrowserStack for allowing me to use their awesome services in order to test the extension in multiple versions of Chrome and in different operating systems.

More documents