aboutsummaryrefslogtreecommitdiff
path: root/extension/content_scripts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2015-11-25 20:41:31 +0100
committerFlorian Dold <florian.dold@gmail.com>2015-11-25 20:46:36 +0100
commit7b6706bee3cbecc84b330672ecdb5764d7d68756 (patch)
tree5941b2d8a53296a4e64712068f82717205840a05 /extension/content_scripts
downloadwallet-core-7b6706bee3cbecc84b330672ecdb5764d7d68756.tar.xz
Add skeleton for WebExtensions wallet
Diffstat (limited to 'extension/content_scripts')
-rw-r--r--extension/content_scripts/notify.js18
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");
+