💸
Fundme
  • Getting Started
  • Using Fundme.js
    • Basic Web Monetization
    • Revenue Sharing
    • Advanced Revenue Sharing
    • Split Money (WIP)
    • Fundme.js Custom Syntax
  • Implementation
    • With bundlers (Webpack, Rollup, etc)
    • Inject to HTML
    • Inject JSON to HTML
    • Calculating revenue sharing Server-Side
  • Integration
    • With no ads feature
    • With premium content
    • With Patreon (maybe?)
    • With Merchandise POD services
Powered by GitBook
On this page

Was this helpful?

  1. Integration

With no ads feature

PreviousCalculating revenue sharing Server-SideNextWith premium content

Last updated 4 years ago

Was this helpful?

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

bash
npm install fundme web-monetization-ad-hider --save
index.js
import { fund } from "fundme";

fund([
    "$wallet.example.com/test",
    "$wallet.example.com/contributor-1",
    "$wallet.example.com/contributor-1"
]);

import "web-monetization-ad-hider";
index.html
<wm-ad-hider>
  <template>
    <script src="https://www.ad-company.com/myAds"></script> 
  </template>
</wm-ad-hider>
<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>

// TODO
// TODO
// TODO

If you have suggestions on integrating Fundme.js with with popular frameworks or setup, please open an issue on . Other feedbacks are welcomed!

https://github.com/ProgNovel/fundme