Created
September 30, 2018 17:15
-
-
Save WietseWind/3554f85d2ebb42d134632c829afc2906 to your computer and use it in GitHub Desktop.
Start and stop Coil donation
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
<button id="stopDonation">Stop Donation</button> | |
<script src="https://polyfill.webmonetization.org/polyfill.js"></script> | |
<script src="https://cdn.coil.com/donate.js"></script> | |
<script> | |
var btn = document.getElementById('stopDonation') | |
btn.style.display = 'none' | |
var Coil = window.WebMonetizationScripts.donate({ | |
paymentPointer: '$twitter.xrptipbot.com/WietseWind' | |
}) | |
Coil.addEventListener('money', function (m) { | |
btn.style.display = 'block' | |
}) | |
btn.onclick = function () { | |
Coil.close() | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment