Find on NPM or Unpkg.
Created by Kewbish.
Revshare.js works with the proposed Web Monetization API.
Add a script tag in your head, referencing either the script in the node_modules dist folder, or the unpkg CDN.
<script src="https://unpkg.com/@kewbish/revshare"></script>
Add a rev-share tag. Required is a pointers attribute, which will include a JSON-formatted mapping of wallet to percentage pointer
<rev-share pointers='[{"$bob.wallet": 50, "$alice.wallet": 50}]'> ... </rev-share>
Revshare.js will take care of adding, updating, and removing payment pointers. It's based on the probablistic rev-share model outlined on the Web Monetization page.
See the complete docs on the project GitHub. Alternatively, see the repository on GitHub.
This was developed by Kewbish for the Dev.to GFTW Hackathon.