I went through a bunch of ideas - a Vue component library, implementing this in another site, or adding it to my existing sites.
Eventually, I settled on this idea, and for the entire month of May (minus an OS reinstall and plus tonnes of Google searching), I spent some time exploring Web Components and Javascript!
I've built Revshare.js, a small Javascript library to make revsharing with Web Monetization easier. It provides an interface for a <rev-share> element with a pointers attribute to make probabilistic revsharing easier.
Submission Category:
Foundational Technology (or perhaps Creative Catalyst, I'm not sure where it fits...)
Demo
Add a <script src="http://unpkg.com/@kewbish/revshare"/> tag to your head, and that's all you need to get started.
...
<rev-sharepointers='["$jackie.wallet": 60, "$charlie.wallet": 40]'><p>This is your revshared content!</p></rev-share>
...
If you'd also like to make your <rev-share> element exclusive, just add the exclusive attribute as well. (This will hide the element when Web Monetization is not enabled.)
...
<rev-sharepointers='["$jackie.wallet": 60, "$charlie.wallet": 40]'exclusive><p>This is your revshared, exclusive content!</p></rev-share>
...
A JS library for revenue sharing, made for the #gftwhackathon.
Available on NPM at @kewbish/revshare.
Made in JS, May 2020.
Created by Kewbish.
Released under the MIT License.