While browsing and reading articles here in DEV
, I found this interesting hackathon
on my feed and started to read some resources and amazing ideas/projects of other developers around the globe for this API so called web monetization
. The docs
is straight forward but sadly I'm having a hard time for searching a website that actually use a web monetization
. So..... heres what I did!
What I built
๐ธ I built a very... very... very... simple npm package
to let you easily check if a certain website is web monetized
Submission Category:
Foundational Technology
Demo
You can easily try the tool by installing it globally and running it on your terminal
Installation
npm install is-web-monetized
Usage (via CLI)
monetized https://testwebmonetization.com/demo.html
๐ก I want to show it in table format. what do you think?
Usage (as dependency)
const { isWebMonetized } from 'is-web-monetized'
const url = 'example.com'
isWebMonetized(url).then(obj => {
/*
{
monetized <boolean>,
url <url>,
content <wallet>,
}
*/
console.log(obj)
}).catch(err => console.log(err))
Link to Code
jkga / is-web-monetized
A very simple tool for checking if Web Monetization is enabled
๐ธ is-web-monetized
A very simple tool for checking if web monetization is enabled on a certain website
What is Web Monetization ?
Web Monetization is an API that allows websites to request small payments from users facilitated by the browser and the user's Web Monetization provider.
Official Website: https://webmonetization.org/
Specifications: https://webmonetization.org/specification.html
Installation
npm install is-web-monetized
Usage
You can check if the website uses the Web Monetization API without going to the website.
๐ก Node module MUST be installed globally
npm install is-web-monetized -g
In your terminal, run monetized [URL]
monetized example.com
or using as a dependency
const { isWebMonetized } from 'is-web-monetized'
const url = 'example.com'
isWebMonetized(url).then(obj => {
/*
{
monetized <boolean>,
url <url>,
content <wallet>,
}
*/
console.log(obj)
}).catch(err => console.
โฆHow I built it
If you recall, I said SIMPLE and it is!. This tool is basically just reads the monetization
meta in a website
dependencies
-
jsdom - for me to easily read the
metas
- isomorphic-fetch
Top comments (9)
I love CLIs, and this is a cool idea! :)
thanks @lirantal ! I love CLIs too especially building tools using blessed and blessed-contrib :)
Ohh now you got me curious. What are you building with blessed?
I used them to build dockly: github.com/lirantal/dockly
Wow.. looks great! I will try it out :)
I am working on cPanel access log reader. I am not yet done and currently rewriting it to react-blessed implementation github.com/jkga/ghorl.
BTW, Thank you for accepting my PR! and here's another one we built using blessed & blessed-contrib
dev.to/jkga/i-sent-a-dashboard-via...
Woah that looks awesome!
Well done
Thank you! :)
Hi, @jkga . Do venture across to the Discover section on Coil to discover some sites that are web monetized.
You could also simulate testing via the test-web-monetization site.
Hello @cyberdees , thank you for the info!