aboutsummaryrefslogtreecommitdiff
path: root/extension/content_scripts/notify.js
diff options
context:
space:
mode:
Diffstat (limited to 'extension/content_scripts/notify.js')
-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");
+