2015-11-25 20:41:31 +01:00
|
|
|
// Script that is injected into pages in order to allow merchants pages to
|
|
|
|
// query the availability of Taler.
|
|
|
|
|
2015-12-03 20:07:03 +01:00
|
|
|
'use strict';
|
2015-11-25 20:41:31 +01:00
|
|
|
|
|
|
|
// Listen to messages from the backend.
|
|
|
|
chrome.runtime.onMessage.addListener(
|
|
|
|
function(request, sender, sendResponse) {
|
|
|
|
// do nothing, yet
|
|
|
|
});
|
|
|
|
|
2015-12-03 20:07:03 +01:00
|
|
|
if (document && document.body)
|
|
|
|
{
|
|
|
|
document.body.addEventListener('taler-checkout-probe', function(e) {
|
|
|
|
let evt = new Event('taler-wallet-present');
|
|
|
|
document.body.dispatchEvent(evt);
|
|
|
|
});
|
|
|
|
}
|
2015-11-25 20:41:31 +01:00
|
|
|
|
|
|
|
console.log("Taler wallet: content page loaded");
|