summaryrefslogtreecommitdiff
path: root/examples/blog/essay_cc-form.html
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-03-02 04:50:24 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-03-02 04:50:24 +0100
commit12795fb41ecc2e0497eaf55f57a6277c92efc7fc (patch)
treea721fc8caee75c809ad2b476e0d0602cfc10d54f /examples/blog/essay_cc-form.html
parent1108f7ca4dbe418c4e641ba07b6d14316daa1f1d (diff)
downloadmerchant-12795fb41ecc2e0497eaf55f57a6277c92efc7fc.tar.gz
merchant-12795fb41ecc2e0497eaf55f57a6277c92efc7fc.tar.bz2
merchant-12795fb41ecc2e0497eaf55f57a6277c92efc7fc.zip
prettier wallet handling
Diffstat (limited to 'examples/blog/essay_cc-form.html')
-rw-r--r--examples/blog/essay_cc-form.html16
1 files changed, 15 insertions, 1 deletions
diff --git a/examples/blog/essay_cc-form.html b/examples/blog/essay_cc-form.html
index 21755409..268861ff 100644
--- a/examples/blog/essay_cc-form.html
+++ b/examples/blog/essay_cc-form.html
@@ -2,7 +2,7 @@
<head>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
- <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <body style="display:none;" lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<header>
<div id="logo"><a href="/"><img src="../gnu.svg" height="100" width="100"/></a></div>
<h1>Credit card payment</h1>
@@ -66,13 +66,27 @@
contract_request.send();
}
+ var walletNotPresent = false;
+
function has_taler_wallet_cb(aEvent){
+ if (walletNotPresent) {
+ return;
+ }
+ // FIXME: this is a template, but very ugly ...
{jscode}
};
+
+
+ function handleTimeout() {
+ walletNotPresent = true;
+ document.body.style.display = "";
+ }
document.addEventListener("taler-wallet-present",
has_taler_wallet_cb,
false);
+
+ window.setTimeout(handleTimeout, 200);
// Register event to be triggered by the wallet when it gets enabled while
// the user is on the payment page