With no ads feature
โ€‹
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.

Using in frameworks/library/vanila JS

Vanila JS
Svelte
React
Vue
Angular
bash
1
npm install fundme web-monetization-ad-hider --save
Copied!
index.js
1
import { fund } from "fundme";
2
โ€‹
3
fund([
4
"$wallet.example.com/test",
5
"$wallet.example.com/contributor-1",
6
"$wallet.example.com/contributor-1"
7
]);
8
โ€‹
9
import "web-monetization-ad-hider";
Copied!
index.html
1
<wm-ad-hider>
2
<template>
3
<script src="https://www.ad-company.com/myAds"></script>
4
</template>
5
</wm-ad-hider>
Copied!
1
<script>
2
import { fund } from "fundme";
3
import SvelteMonetization from "svelte-monetization";
4
5
const fundmeInit = fund("$wallet.example.com/content-creator");
6
</script>
7
โ€‹
8
<SvelteMonetization let:isLoading let:isMonetized>
9
{#if isLoading}
10
<div>Loading message here</div>
11
{:else if isMonetized}
12
<div>Monetized/premium content here</div>
13
{:else}
14
<div>Show ads here</div>
15
{/if}
16
</SvelteMonetization>
17
โ€‹
18
โ€‹
Copied!
1
// TODO
Copied!
1
// TODO
Copied!
1
// TODO
Copied!
If you have suggestions on integrating Fundme.js with with popular frameworks or setup, please open an issue on https://github.com/ProgNovel/fundme. Other feedbacks are welcomed!
Last modified 1yr ago