Created
January 10, 2019 19:44
-
-
Save dymurray/b83d9145cbea1f954a66815736a78a67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymo | |
us"> | |
<link rel="icon" href="https://s2.coinmarketcap.com/static/img/coins/200x200/3602.png"> | |
<link rel="stylesheet" href="./index.css"> | |
<title>Bitcoin Plays Pokemon</title> | |
</head> | |
<body> | |
<!-- Optional JavaScript --> | |
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> | |
</body> | |
<!-- This line should go where you want to put your button --> | |
<div class="jumbotron-fluid text-center bg-info"> | |
<img src="https://s2.coinmarketcap.com/static/img/coins/200x200/3602.png" alt="Bitcoin SV"> | |
<h1>Bitcoin Plays Pokemon!</h1> | |
<hr class="my-4"> | |
<p class="lead">Swipe a MoneyButton to make a move!</p> | |
<p class="lead">All moves cost 1/10th of a penny and are considered a donation to the site.</p> | |
<p>The stream is about 6 seconds behind but the move will be displayed to the right instantly.</p> | |
</div> | |
<div class="d-flex justify-content-center"> | |
<iframe src="https://player.twitch.tv/?channel=bitcoinplayspoke" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe><a href="https://www.twitch.tv/bitcoinplayspoke?tt_con | |
tent=text_link&tt_medium=live_embed" style="padding:2px 0px 4px; display:block; width:100px; font-weight:normal; font-size:10px; text-decoration:underline;"></a> | |
<div id="result", class="jumbotron text-center", style="width: 200px; overflow: auto; height: 378px; font-weight:bold; font-size:20px; border-style:solid; border-width: 5px;"> | |
<h4>Moves</h4> | |
<hr class="my-4"> | |
</div> | |
</div> | |
<hr class="my-4"> | |
<div class="row no-gutters container-fluid"> | |
<div class="col-md"> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="display-block mx-auto"> | |
<div class="money-button" | |
data-to="1FLiyeL92cX8u8CVJrXpVrYR6VbBxwcCoq" | |
data-amount="0.001" | |
data-currency="USD" | |
data-label="Up" | |
data-client-identifier="b297e61a73195f3e62dc10aece6968d7" | |
data-button-id="1545235394218" | |
data-button-data="{}" | |
data-hide-amount="true" | |
data-type="tip" | |
data-op-return="up" | |
></div> | |
</div> | |
</div> | |
<div class="row align-center"> | |
<div class="col-md-6"> | |
<div class="block float-right"> | |
<div class="money-button" | |
data-to="1FLiyeL92cX8u8CVJrXpVrYR6VbBxwcCoq" | |
data-amount="0.001" | |
data-currency="USD" | |
data-hide-amount="true" | |
data-label="Left" | |
data-client-identifier="b297e61a73195f3e62dc10aece6968d7" | |
data-button-id="1545235394218" | |
data-button-data="{}" | |
data-type="tip" | |
data-op-return="left" | |
></div> | |
</div> | |
</div> | |
<div class="col-md-6"> | |
<div class="money-button display-block" | |
data-to="1FLiyeL92cX8u8CVJrXpVrYR6VbBxwcCoq" | |
data-amount="0.001" | |
data-currency="USD" | |
data-hide-amount="true" | |
data-label="Right" | |
data-client-identifier="b297e61a73195f3e62dc10aece6968d7" | |
data-button-id="1545235394218" | |
data-button-data="{}" | |
data-type="tip" | |
data-op-return="right" | |
></div> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="display-block mx-auto"> | |
<div class="money-button" | |
data-to="1FLiyeL92cX8u8CVJrXpVrYR6VbBxwcCoq" | |
data-amount="0.001" | |
data-currency="USD" | |
data-label="Down" | |
data-client-identifier="b297e61a73195f3e62dc10aece6968d7" | |
data-button-id="1545235394218" | |
data-button-data="{}" | |
data-hide-amount="true" | |
data-type="tip" | |
data-op-return="down" | |
></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="col-md-4"> | |
<div class="row container"> | |
<div class="col-md-6 float-right"> | |
<div class="money-button" | |
data-to="1FLiyeL92cX8u8CVJrXpVrYR6VbBxwcCoq" | |
data-amount="0.001" | |
data-currency="USD" | |
data-label="A" | |
data-client-identifier="b297e61a73195f3e62dc10aece6968d7" | |
data-button-id="1545235394218" | |
data-button-data="{}" | |
data-type="tip" | |
data-op-return="z" | |
></div> | |
</div> | |
<div class="col-md-4"> | |
<div class="money-button float-left" | |
data-to="1FLiyeL92cX8u8CVJrXpVrYR6VbBxwcCoq" | |
data-amount="0.001" | |
data-currency="USD" | |
data-label="B" | |
data-client-identifier="b297e61a73195f3e62dc10aece6968d7" | |
data-button-id="1545235394218" | |
data-button-data="{}" | |
data-type="tip" | |
data-op-return="x" | |
></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- This line can go anywhere --> | |
<script src="https://www.moneybutton.com/moneybutton.js"></script> | |
<script> | |
var source = new EventSource("https://bitgraph.network/s/ewogICJ2IjogMywKICAicSI6IHsKICAgICJmaW5kIjogeyJvdXQuYjAiOiB7ICJvcCI6IDEwNiB9LCAib3V0LmUuYSI6ICJxenc1ZWR6N3F1MDl1cHFlaHU0dHZ4ODJraGM5azAwejJ1MHRxOXU4Y2 | |
QifQogIH0sCiAgInIiOiB7CiAgICAiZiI6ICJbLltdIHwge21zZzogLm91dFswXS5zMX1dIgogIH0KfQ=="); | |
source.onmessage = function(event) { | |
var data = JSON.parse(event.data) | |
console.log(data); | |
console.log(data.type); | |
if (data.type == "mempool") { | |
var key = data.data[0].msg; | |
if (key == "z") { | |
key = "A" | |
} | |
if (key == "x") { | |
key = "B" | |
} | |
document.getElementById("result").innerHTML += key + "<br>"; | |
document.getElementById("result").scrollTop = document.getElementById("result").scrollHeight | |
} | |
} | |
</script> | |
<ul></ul> | |
<div class="jumbotron"> | |
<p>Disclaimer: All proceeds are considered donations to maintain the site. I am not charging anyone to play the game but merely tying OP RETURN data in donations to keypresses. This was merely the result of an e | |
ducational project for myself. The only donations that are monitored are Bitcoin SV donations. Please do NOT send BTC or BCH to this address. Money Button does not allow for more than 25 chained unconfirmed tran | |
sactions, if you get an error that says 400 Bad Request that is more than likely the culprit.</p> | |
</div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment