Skip to content

Commit

Permalink
Merge pull request etotheipi#18 from jonathancross/improve-demo-links
Browse files Browse the repository at this point in the history
Improve demo links
  • Loading branch information
sipa committed May 20, 2017
2 parents 6e84834 + cbaf40d commit 45422e1
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<style>
.monospace { font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; }
.monospace {
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
}
a.demo_link {
text-decoration-style: dashed;
text-underline-position: under;
}
</style>
</head>
<body>
Expand Down Expand Up @@ -43,6 +49,11 @@
if(!address.length) document.getElementById("result").innerHTML = "";
document.getElementById("copy").innerHTML = cp;
}

function load_addr(addr) {
document.getElementById("address").value = addr;
update_status();
}
</script>
<div class="container" style="margin-top:50px">
<div class="card mb-3 text-left">
Expand Down Expand Up @@ -79,9 +90,9 @@ <h3 class="card-header">Decoder demo</h3>
<p><span class="monospace"><a id="copy"><br/></a></span></p>
Fill field with:
<ul>
<li> <a style="text-decoration:underline;" onclick='document.getElementById("address").value = "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4";update_status();'>P2WPKH example</a>
<li> <a style="text-decoration:underline;" onclick='document.getElementById("address").value = "BC1QW508D6QEJXTDG4Y5R3ZARVAYR0C5XW7KV8F3T4";update_status();'>P2WPKH example with errors</a>
<li> <a style="text-decoration:underline;" onclick='document.getElementById("address").value = "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3";update_status();'>P2WSH example</a>
<li> <a class="demo_link" href='javascript:load_addr("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4");'>P2WPKH example</a>
<li> <a class="demo_link" href='javascript:load_addr("BC1QW508D6QEJXTDG4Y5R3ZARVAYR0C5XW7KV8F3T4");'>P2WPKH example with errors</a>
<li> <a class="demo_link" href='javascript:load_addr("bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3");'>P2WSH example</a>
</ul>
</div>
</div>
Expand Down

0 comments on commit 45422e1

Please sign in to comment.