Summary
Enhance the browser extension (extension/) to detect Stellar addresses on any webpage and inject an inline "Donate with IndigoPay" button next to detected addresses, enabling one-click donations without leaving the current page.
Background
The extension detects Stellar addresses and allows donation via popup. An injected button directly on the page reduces friction: see "Donate" → click → enter amount → sign. Imagine a climate project's Stellar address in a tweet or GitHub README — donate in one click.
Problem Statement
Popup-based flow requires: notice badge → click icon → select address → enter amount → sign. Injected button reduces to: see "Donate" → click → amount → sign. Dramatically lowers barrier to spontaneous donations.
Objectives
- Build content script injecting "💚 Donate" buttons next to Stellar addresses.
- Build inline donation form (shadow DOM isolated) opened on button click.
- Integrate with Freighter wallet for transaction signing.
- Show donation confirmation inline.
- Add extension settings for configuration.
Scope
In Scope:
extension/src/content.js: walk DOM text nodes, match G[A-Z0-9]{55}, inject button, MutationObserver for dynamic content, rate limit 2s.
- Shadow DOM donation popover: address display, amount quick-select, message field, Freighter integration, loading/success/error states.
extension/src/background.js: handle FETCH_PROJECT_INFO, BUILD_TRANSACTION, SUBMIT_TRANSACTION messages.
extension/settings.html: default amount, currency, auto-detect toggle, excluded domains, theme.
- Popup enhancement: recent inline donations, quick link to settings.
Out of Scope:
- Non-registered addresses (show "not a registered project"), iframes, mobile browser extension.
Acceptance Criteria
Testing Requirements
- Unit tests: regex, DOM injection, MutationObserver, shadow DOM.
- Integration + E2E + cross-browser tests.
CI Requirements
cd extension && npm test, cd extension && npm run build. web-ext lint for Firefox.
Deliverables
extension/src/content.js, donate-form.js
extension/src/background.js (updated)
extension/src/styles/content.css
- Updated
extension/popup.html, popup.css, settings.html
- Updated
extension/manifest.json, manifest.firefox.json
Definition of Done
- Donate button appears next to Stellar addresses on any page. Full flow inline. No style leakage. Cross-browser. Submission-ready.
References
extension/manifest.json, extension/popup.html, extension/webpack.config.js
docs/extension-build-process.md
frontend/lib/stellar.ts, frontend/components/DonateForm.tsx
To contribute more to the project, join our Telegram group - https://t.me/StellarIndigoPay/4
Summary
Enhance the browser extension (
extension/) to detect Stellar addresses on any webpage and inject an inline "Donate with IndigoPay" button next to detected addresses, enabling one-click donations without leaving the current page.Background
The extension detects Stellar addresses and allows donation via popup. An injected button directly on the page reduces friction: see "Donate" → click → enter amount → sign. Imagine a climate project's Stellar address in a tweet or GitHub README — donate in one click.
Problem Statement
Popup-based flow requires: notice badge → click icon → select address → enter amount → sign. Injected button reduces to: see "Donate" → click → amount → sign. Dramatically lowers barrier to spontaneous donations.
Objectives
Scope
In Scope:
extension/src/content.js: walk DOM text nodes, matchG[A-Z0-9]{55}, inject button, MutationObserver for dynamic content, rate limit 2s.extension/src/background.js: handleFETCH_PROJECT_INFO,BUILD_TRANSACTION,SUBMIT_TRANSACTIONmessages.extension/settings.html: default amount, currency, auto-detect toggle, excluded domains, theme.Out of Scope:
Acceptance Criteria
Testing Requirements
CI Requirements
cd extension && npm test,cd extension && npm run build.web-ext lintfor Firefox.Deliverables
extension/src/content.js,donate-form.jsextension/src/background.js(updated)extension/src/styles/content.cssextension/popup.html,popup.css,settings.htmlextension/manifest.json,manifest.firefox.jsonDefinition of Done
References
extension/manifest.json,extension/popup.html,extension/webpack.config.jsdocs/extension-build-process.mdfrontend/lib/stellar.ts,frontend/components/DonateForm.tsxTo contribute more to the project, join our Telegram group - https://t.me/StellarIndigoPay/4