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 |
Add skeleton for WebExtensions wallet
Diffstat (limited to 'extension')
-rw-r--r-- | extension/background/wallet.js | 2 | ||||
-rw-r--r-- | extension/content_scripts/notify.js | 18 | ||||
-rw-r--r-- | extension/icons/taler-logo-24.png | bin | 0 -> 1452 bytes | |||
-rw-r--r-- | extension/manifest.json | 41 | ||||
-rw-r--r-- | extension/popup/reserves.html | 7 | ||||
-rw-r--r-- | extension/popup/transactions.html | 7 | ||||
-rw-r--r-- | extension/popup/wallet.html | 21 |
7 files changed, 96 insertions, 0 deletions
diff --git a/extension/background/wallet.js b/extension/background/wallet.js new file mode 100644 index 000000000..a7a9c6cb6 --- /dev/null +++ b/extension/background/wallet.js @@ -0,0 +1,2 @@ +// Nothing here yet. +// Eventually, the backend for the wallet will be implemented here. 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"); + diff --git a/extension/icons/taler-logo-24.png b/extension/icons/taler-logo-24.png Binary files differnew file mode 100644 index 000000000..00a908e79 --- /dev/null +++ b/extension/icons/taler-logo-24.png diff --git a/extension/manifest.json b/extension/manifest.json new file mode 100644 index 000000000..b0ad9720e --- /dev/null +++ b/extension/manifest.json @@ -0,0 +1,41 @@ +{ + "description": "Privacy preserving and transparent payments", + "manifest_version": 2, + "name": "Taler Wallet", + "version": "1.0", + + "applications": { + "gecko": { + "id": "devs@taler.net" + } + }, + + "permissions": [ + "http://*/*", + "https://*/*" + ], + + "browser_action": { + "default_icon": "icons/taler-logo-24.png", + "default_title": "Taler", + "default_popup": "popup/wallet.html" + }, + + "web_accessible_resources": [ + "popup/reserves.html", + "popup/wallet.html" + ], + + "content_scripts": [ + { + "matches": ["*://*/*"], + "js": ["content_scripts/notify.js"], + "run_at": "document_start" + } + ], + + "background": { + "scripts": ["background/wallet.js"] + } + +} diff --git a/extension/popup/reserves.html b/extension/popup/reserves.html new file mode 100644 index 000000000..63db032e5 --- /dev/null +++ b/extension/popup/reserves.html @@ -0,0 +1,7 @@ +<!doctype html> + +<a href="javascript:history.back()">Back</a> + +<p /> + +Your reserves are listed here. diff --git a/extension/popup/transactions.html b/extension/popup/transactions.html new file mode 100644 index 000000000..427100853 --- /dev/null +++ b/extension/popup/transactions.html @@ -0,0 +1,7 @@ +<!doctype html> + +<a href="javascript:history.back()">Back</a> + +<p /> + +Your past transactions are listed here. diff --git a/extension/popup/wallet.html b/extension/popup/wallet.html new file mode 100644 index 000000000..f27387b1d --- /dev/null +++ b/extension/popup/wallet.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> + +<html> + <head> + <meta charset="utf-8"> + </head> + +<body> + This is the Taler wallet. + + <p /> + + <a href='reserves.html'>Reserves</a> + <a href='transactions.html'>Transaction History</a> + + <p /> + + Your balance will be displayed here. +</body> + +</html> |