-
-
Save sharafian/32252bdc12d7cf75ba739c9ebd18a7e5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="https://polyfill.webmonetization.org/polyfill.js"></script> | |
| <script src="https://cdn.coil.com/donate.js"></script> | |
| <script> | |
| const donation = window.WebMonetizationScripts.donate({ | |
| paymentPointer: '$spsp.strata-ilsp.com' | |
| }) | |
| donation.addEventListener('money', ev => { | |
| const message = document.createElement('p') | |
| message.innerHTML = 'Got micropayment for ' + ev.detail.amount + ' nanodollars' | |
| document.body.appendChild(message) | |
| }) | |
| </script> | |
| </head> | |
| <body> | |
| <h1>Web Monetization Example</h1> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment