This page is still a draft. Our implementation below haven't yet been tested! Please don't use for production right now, as it likely won't work as expected.
Vanila JS Svelte React Vue Angular
Copy npm install fundme web-monetization-ad-hider --save
Copy import { fund } from "fundme";
fund([
"$wallet.example.com/test",
"$wallet.example.com/contributor-1",
"$wallet.example.com/contributor-1"
]);
import "web-monetization-ad-hider";
Copy <wm-ad-hider>
<template>
<script src="https://www.ad-company.com/myAds"></script>
</template>
</wm-ad-hider>
Copy <script>
import { fund } from "fundme";
import SvelteMonetization from "svelte-monetization";
const fundmeInit = fund("$wallet.example.com/content-creator");
</script>
<SvelteMonetization let:isLoading let:isMonetized>
{#if isLoading}
<div>Loading message here</div>
{:else if isMonetized}
<div>Monetized/premium content here</div>
{:else}
<div>Show ads here</div>
{/if}
</SvelteMonetization>