diff options
Diffstat (limited to 'src/frontend/checkout.php')
-rw-r--r-- | src/frontend/checkout.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/frontend/checkout.php b/src/frontend/checkout.php index 9ba371e6..0e06922a 100644 --- a/src/frontend/checkout.php +++ b/src/frontend/checkout.php @@ -153,7 +153,6 @@ function has_taler_wallet_cb(aEvent) }; - /* Function called when the Taler extension was unloaded, here we disable the option */ function taler_wallet_unload_cb(aEvent) @@ -181,6 +180,15 @@ test_without_wallet(); // first event document.body.addEventListener("taler-wallet-mfirst", has_taler_wallet_cb, false); +// The following callback is used to allow the button to change its +// color whenever the user navigates away from this page +document.body.addEventListener("taler-shutdown", + function(){ + var unloadEvent = new Event('taler-unload'); + document.body.dispatchEvent(unloadEvent); + }, + false); + // event awaited by the wallet to change its button's color // alert("sending"); // var eve = new Event('taler-payment-mfirst'); |