Page MenuHomePhabricator

[Cashtab] Use chrome API instead of extensionizer
ClosedPublic

Authored by bytesofman on Jun 6 2025, 12:43.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCb5976cd0a4eb: [Cashtab] Use chrome API instead of extensionizer
Summary

"extensionizer" is a polyfill dep that allows a browser extension to work for both Chrome and Firefox APIs. However, we have never supported non-Chrome browsers for this extension, and extensionizer has not been updated for 7 years.

Stop using extensionizer and instead directly use the chrome API.

Doing this as a precursor to other extension improvements (use extension storage API instead of indexedDb, implement typescript, more dev-friendly app interactions, etc)

Test Plan

npm run extension to build locally, use it locally, it works; npm test to confirm nothing breaks

Event Timeline

modify eslint to include webextension globals, lint

bytesofman published this revision for review.Jun 6 2025, 12:57
emack added a subscriber: emack.

Unrelated to diff, but a few observations

  1. The Cashtab splash screen appears every single time you click on the extension rather than upon initial load. Is that expected? I recall it was meant to show every time you hit up chronik for an utxo refresh.
  1. Is there meant to be a scrollbar on the header? Each component in the header seems unnecessarily wide.

image.png (607×412 px, 59 KB)

This revision is now accepted and ready to land.Jun 6 2025, 14:50
  1. The Cashtab splash screen appears every single time you click on the extension rather than upon initial load. Is that expected? I recall it was meant to show every time you hit up chronik for an utxo refresh.

The extension is never running in the background -- it needs to update the chronik servers every time it opens, so without the splash screen ever time it would have a white screen. Possible optimization here (questionable if people want the extension always running, though I could see some benefits, e.g. notifications, always integrates with other open tabs, etc). So, not ideal but this is expected behavior.

  1. Is there meant to be a scrollbar on the header? Each component in the header seems unnecessarily wide.

No, this needs to be patched. It was introduced when the header upgraded and is unrelated to this diff.