GithubHelp home page GithubHelp logo

Comments (2)

vezwork avatar vezwork commented on July 19, 2024

Step 1

part 1

Get your site monetized by adding a Web Monetization meta tag. Try dragging the meta tag to its place in this example site's code.

  • Developer note: hovering over meta tag could make the puzzle piece do a jumping animation.

part 2 - After dragging the piece into place

Perfect! The Web Monetization meta tag goes in the head of your website.
You'll start receiving money as users who have started using Web Monetization spend time on your site.
We’ll go over how to include your own monetization account at the end of the tutorial.

  • Developer note: could provide a link on your own monetization account, so interested users can jump to this info.

from a-web-monetization-story.

sharon-wang avatar sharon-wang commented on July 19, 2024

Code from https://github.com/esse-dev/web-monetization-base/blob/master/simple.html

Step 1: Add monetization meta tag -- 1 block

  • may want to replace below code with <meta name="monetization" content="MY_PAYMENT_POINTER">
<meta name="monetization" content="$ilp.uphold.com/aEYQyH47UYPY">

Step 2: Check for document.monetization -- 1 block

if (document.monetization) {

}

Step 3: Listen for monetizationprogress event -- 1 block

document.monetization.addEventListener('monetizationprogress', event => {

});

Step 4: Show element -- part 1 -- 1 block

<div id="thank-you-note" style="display: none; background-color: #5D67FF; color: #FFF">thank you for supporting me via Web Monetization <3</div> // add to body

Step 4: Show element -- part 2 -- 1 block

document.getElementById('thank-you-note').style.display = 'block'; // within monetization progress event

document.getElementById('thank-you-note').style.display = 'none'; // within else case for document.monetization check

Congrats page with link to resources such as

from a-web-monetization-story.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.