diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-13 12:57:23 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-13 12:57:40 -0300 |
commit | f9d3018668eb801b4598592b1a01e4f3efc2f061 (patch) | |
tree | d66a13f180fa15a143e03077dbfdd63dda6eade2 /packages | |
parent | 7b2de89444f27faa554bb40855da996a113ef5b9 (diff) | |
download | wallet-core-f9d3018668eb801b4598592b1a01e4f3efc2f061.tar.xz |
firefox support
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-webextension/manifest-v2.json | 4 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/taler-wallet-interaction-support.ts | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/manifest-v2.json b/packages/taler-wallet-webextension/manifest-v2.json index a5b77168c..794aac3b1 100644 --- a/packages/taler-wallet-webextension/manifest-v2.json +++ b/packages/taler-wallet-webextension/manifest-v2.json @@ -21,6 +21,10 @@ "https://*/*", "activeTab" ], + "web_accessible_resources": [ + "static/wallet.html", + "dist/taler-wallet-interaction-support.js" + ], "optional_permissions": [ "http://*/*", "https://*/*", diff --git a/packages/taler-wallet-webextension/src/taler-wallet-interaction-support.ts b/packages/taler-wallet-webextension/src/taler-wallet-interaction-support.ts index a0ddc40f1..7f706e815 100644 --- a/packages/taler-wallet-webextension/src/taler-wallet-interaction-support.ts +++ b/packages/taler-wallet-webextension/src/taler-wallet-interaction-support.ts @@ -98,10 +98,16 @@ function buildApi(config: Readonly<Info>): API { logger.debug(`onclick: could not convert "${hrefAttr.value}" into path`); return; } + // we can use window.open, but maybe some browser will block it? window.open(page, windowTarget); ev.preventDefault(); ev.stopPropagation(); ev.stopImmediatePropagation(); + // another possibility is to change the location when the click is made + // or when the anchor is found + // hrefAttr.value = page + // TODO: explore different possibilities and maybe allow the configuration + // using the meta-tag return false; } |