I'm building a Chrome extension which is supposed to able able:

a) insert custom button on a website, depending on some condtion

b) a button will have to invoke MetaMask, or any other browser-based wallet. But primarilty MetaMask

c) pass some data to it -- "an amount of a payment required for a user to pay"

How can a browser extension activate MetaMask? If at all.

Otherwise, what would be other options?

1 Answer 1


What you're looking for is content scripts (https://developer.chrome.com/docs/extensions/mv3/content_scripts). They're part of your extension build and can be injected into web pages.

  • you haven't answered my question
    – Kum
    Sep 18, 2022 at 11:02
  • from a content script you could access the api exposed by wallets like metamask under window.ethereum
    – mortimr
    Sep 19, 2022 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.