diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-11-25 20:41:31 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-11-25 20:46:36 +0100 |
commit | 7b6706bee3cbecc84b330672ecdb5764d7d68756 (patch) | |
tree | 5941b2d8a53296a4e64712068f82717205840a05 /extension/content_scripts/notify.js |
Add skeleton for WebExtensions wallet
Diffstat (limited to 'extension/content_scripts/notify.js')
-rw-r--r-- | extension/content_scripts/notify.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/extension/content_scripts/notify.js b/extension/content_scripts/notify.js new file mode 100644 index 000000000..3a0f9001d --- /dev/null +++ b/extension/content_scripts/notify.js @@ -0,0 +1,18 @@ +// Script that is injected into pages in order to allow merchants pages to +// query the availability of Taler. + + +// Listen to messages from the backend. +chrome.runtime.onMessage.addListener( + function(request, sender, sendResponse) { + // do nothing, yet +}); + + +document.addEventListener('taler-checkout-probe', function(e) { + let evt = new Event('taler-wallet-present'); + document.dispatchEvent(evt); +}); + +console.log("Taler wallet: content page loaded"); + |