Page MenuHomePhabricator

[Cashtab Extension] Migrate to v3 manifest
ClosedPublic

Authored by bytesofman on Oct 26 2023, 18:45.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCf3e86163c920: [Cashtab Extension] Migrate to v3 manifest
Summary

T2495

Migrate the Cashtab extension to v3 manifest

Chrome will (someday) discontinue support for the v2 manifest. In the meantime, they are taking a long time to review new versions with the v2 manifest.

I've updated the major version number as, going forward, manifest v3 code syntax rules will apply. Users of the extension do not have to perform any migration action.

Test Plan

npm run extension, load the unpacked extension in chrome or brave (see README), and enable it. Disable the official cashtab extension if you have it.
Visit components.cashtab.com
Confirm that the "get address" component and the "Cashtab Badge" components update the extension
Try it with Paybutton, e.g. https://proofofwriting.com/181/, confirm extension opens

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

remove content security policy settings that were added as a test fix, not necessary

Improve comments, add newline at end of extension script

.prettierignore
10 ↗(On Diff #42817)

arguably an unrelated change, handled here D14693

cashtab/extension/public/manifest.json
2 ↗(On Diff #42817)

Can review migration requirements here. Only a handful apply to Cashtab.

https://developer.chrome.com/docs/extensions/migrating/

33 ↗(On Diff #42817)

Ref https://stackoverflow.com/questions/9515704/access-variables-and-functions-defined-in-page-context-using-a-content-script/9517879#9517879

Manifest v3 does not allow creation of element in contentscript, requires it to come from its own file which is referenced in the manifest.

cashtab/extension/src/contentscript.js
7 ↗(On Diff #42817)
This revision is now accepted and ready to land.Oct 27 2023, 06:25