diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-12-16 10:45:16 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-12-16 10:45:16 +0100 |
commit | 276f9108ab1dac3b7fc6670b1061f8cf7809785a (patch) | |
tree | f8d7fe273c6fc710da7317833d9961912a17fe55 /extension/content_scripts | |
parent | 1b295d0f1aa18ece305fdc96cc356bfc2e794934 (diff) | |
download | wallet-core-276f9108ab1dac3b7fc6670b1061f8cf7809785a.tar.xz |
missing files
Diffstat (limited to 'extension/content_scripts')
-rw-r--r-- | extension/content_scripts/notify.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/extension/content_scripts/notify.js b/extension/content_scripts/notify.js index 0fab0e6dc..640c5bdc6 100644 --- a/extension/content_scripts/notify.js +++ b/extension/content_scripts/notify.js @@ -18,6 +18,11 @@ document.addEventListener("DOMContentLoaded", function(e) { document.body.dispatchEvent(evt); console.log("bank handshake done"); }); + document.body.addEventListener('taler-checkout-probe', function(e) { + let evt = new Event('taler-wallet-present'); + document.body.dispatchEvent(evt); + console.log("merchant handshake done"); + }); document.body.addEventListener('taler-create-reserve', function(e) { let $ = (x) => document.getElementById(x); console.log("taler-create-reserve with " + JSON.stringify(e.detail)); @@ -37,6 +42,15 @@ document.addEventListener("DOMContentLoaded", function(e) { let uri = URI(chrome.extension.getURL("pages/confirm-create-reserve.html")); document.location.href = uri.query(params).href(); }); + document.body.addEventListener('taler-contract', function(e) { + // XXX: the merchant should just give us the parsed data ... + let contract = JSON.parse(e.detail); + let uri = URI(chrome.extension.getURL("pages/confirm-contract.html")); + let params = { + contract: JSON.stringify(contract) + } + document.location.href = uri.query(params).href(); + }); }); console.log("Taler wallet: content page loaded"); |