fundme
Version:
A simple but powerful client-side library to manage monetization on the web.
31 lines (27 loc) • 961 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Web Monetization API test!</title>
<meta name="monetization" content />
</head>
<body>
<h1 id="text">Loading...</h1>
<script src="../../dist/fundme-iife.js"></script>
<script>
fundme.fund([
'$wallet.example.com/address-one',
'$wallet.example.com/address-two',
'$wallet.example.com/address-three',
])
// code below are optional, just to show that fundme is working
if (document.monetization) {
const address = document.querySelector('meta[name="monetization"]').content
document.getElementById('text').innerText = `Browser is streaming to ${address}`
} else {
document.getElementById('text').innerText = `Coil extension not found.`
}
</script>
</body>
</html>