diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx index 0916f4f43..4805c03ca 100644 --- a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx @@ -170,7 +170,7 @@ export function View({ <p> <i18n.Translate>Debug tools</i18n.Translate>: </p> - <Grid container justifyContent="space-between" spacing={1}> + <Grid container justifyContent="space-between" spacing={1} size={4}> <Grid item> <Button variant="contained" @@ -251,6 +251,64 @@ export function View({ <i18n.Translate>export database</i18n.Translate> </Button> </Grid> + <Grid item> + <Button + variant="contained" + onClick={async () => { + navigator.registerProtocolHandler( + "taler", + `${window.location.origin}/static/wallet.html#/cta/withdraw?talerWithdrawUri=%s`, + ); + }} + > + <i18n.Translate>Register taler:// handler</i18n.Translate> + </Button> + </Grid> + <Grid item> + <Button + variant="contained" + onClick={async () => { + const n = navigator as any; + if ("unregisterProtocolHandler" in n) { + n.unregisterProtocolHandler( + "taler", + `${window.location.origin}/static/wallet.html#/cta/withdraw?talerWithdrawUri=%s`, + ); + } + }} + > + <i18n.Translate>Remove taler:// handler</i18n.Translate> + </Button> + </Grid>{" "} + <Grid item> + <Button + variant="contained" + onClick={async () => { + navigator.registerProtocolHandler( + "ext+taler", + `${window.location.origin}/static/wallet.html#/cta/withdraw?talerWithdrawUri=%s`, + ); + }} + > + <i18n.Translate>Register ext+taler:// handler</i18n.Translate> + </Button> + </Grid> + <Grid item> + <Button + variant="contained" + onClick={async () => { + const n = navigator as any; + if ("unregisterProtocolHandler" in n) { + n.unregisterProtocolHandler( + "ext+taler", + `${window.location.origin}/static/wallet.html#/cta/withdraw?talerWithdrawUri=%s`, + ); + } + }} + > + <i18n.Translate>Remove ext+taler:// handler</i18n.Translate> + </Button> + </Grid>{" "} </Grid> {downloadedDatabase && ( <div> |