aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-11-02 00:46:57 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-11-02 00:46:57 +0100
commitd6a3a54d28a5d1e21cc3cca9927c78f674044531 (patch)
tree6a1c7da3e73305ecbf12e67fcbbbe1fbe6bfe302
parent574e6ce37ccf11fb15788937239acf79d76a8c20 (diff)
downloadwallet-core-d6a3a54d28a5d1e21cc3cca9927c78f674044531.tar.gz
wallet-core-d6a3a54d28a5d1e21cc3cca9927c78f674044531.tar.bz2
wallet-core-d6a3a54d28a5d1e21cc3cca9927c78f674044531.zip
installation popup in FF
-rw-r--r--manifest.json4
-rw-r--r--src/webex/background.ts2
-rw-r--r--src/webex/pages/tip.tsx2
-rw-r--r--src/webex/wxBackend.ts19
4 files changed, 17 insertions, 10 deletions
diff --git a/manifest.json b/manifest.json
index 61e063ea9..5abbccae0 100644
--- a/manifest.json
+++ b/manifest.json
@@ -4,8 +4,8 @@
"name": "GNU Taler Wallet (git)",
"description": "Privacy preserving and transparent payments",
"author": "GNU Taler Developers",
- "version": "0.6.69",
- "version_name": "0.6.0pre2",
+ "version": "0.6.70",
+ "version_name": "0.6.0pre3",
"minimum_chrome_version": "51",
"minimum_opera_version": "36",
diff --git a/src/webex/background.ts b/src/webex/background.ts
index 3c63f323e..dbc540df4 100644
--- a/src/webex/background.ts
+++ b/src/webex/background.ts
@@ -23,7 +23,7 @@
/**
* Imports.
*/
-import {wxMain} from "./wxBackend";
+import { wxMain } from "./wxBackend";
window.addEventListener("load", () => {
wxMain();
diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx
index 0a066053b..148b8203c 100644
--- a/src/webex/pages/tip.tsx
+++ b/src/webex/pages/tip.tsx
@@ -88,7 +88,7 @@ function TipDisplay(props: { talerTipUri: string }) {
</p>
<form className="pure-form">
<ProgressButton loading={loading} onClick={() => accept()}>
- AcceptTip
+ Accept Tip
</ProgressButton>
{" "}
<button className="pure-button" type="button" onClick={() => discard()}>
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 564ee24f0..16cd2a78c 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -547,19 +547,26 @@ function injectScript(
});
}
-/**
- * Main function to run for the WebExtension backend.
- *
- * Sets up all event handlers and other machinery.
- */
-export async function wxMain() {
+try {
+ // This needs to be outside of main, as Firefox won't fire the event if
+ // the listener isn't created synchronously on loading the backend.
chrome.runtime.onInstalled.addListener(details => {
+ console.log("onInstalled with reason", details.reason);
if (details.reason === "install") {
const url = chrome.extension.getURL("/src/webex/pages/welcome.html");
chrome.tabs.create({ active: true, url: url });
}
});
+} catch (e) {
+ console.error(e);
+}
+/**
+ * Main function to run for the WebExtension backend.
+ *
+ * Sets up all event handlers and other machinery.
+ */
+export async function wxMain() {
// Explicitly unload the extension page as soon as an update is available,
// so the update gets installed as soon as possible.
chrome.runtime.onUpdateAvailable.addListener(details => {