getAlby / lightning-browser-extension

The Bitcoin Lightning Browser extension that connects to different wallet interfaces and brings deep lightning integration to the web
https://getalby.com
MIT License
524 stars 192 forks source link

Check for page content and links in Monetization #1422

Open im-adithya opened 1 year ago

im-adithya commented 1 year ago

Is your feature request related to a problem? Please describe

Currently, we are making batteries for each and every website. Instead, we can improve our Monetization battery which is essentially built as a fallback to other batteries.

But the Monetization battery checks only for the lightning meta tag but not the content of the page and the embedded links. It would be good to add them as well as that would help us save time.

i.e. by adding checks for document.body.innerText and document.querySelector("a[href*='getalby.com']")

Additional context

Can we remove all other batteries after adding this then?

No. Because there still are some cases where this doesn't work (like in the case of MixCloud where we used APIs) or if we decide to embed our own ("send satoshis") buttons in future in the websites to open our extension from there, as we can't generalize the place for our button as it varies from website to website (and hence can't be generalized)!

Are you working on this?

Would like to if approved!

qqqzhch commented 1 year ago

can refer to the way to add tokens to the Ethereum community mobile client wallet, and make templates of the things you need to add and submit them through github In this way, each website or page owner can define its own rules for example https://github.com/consenlabs/token-profile