I am working on a google chrome extension that upon opening a new tab, my dapp should connect to metamask. However, web3 isn't being detected when opening a new tab. I'm thinking it's because I have to do what MetaMask does of injecting a script tag into the DOM.
Is this project a good start for building a chrome app that can connect to metamask upon opening a new tab? Or can you elaborate on how I can go about doing so? I went about starting my project using truffle-react. Any help is appreciated.