Our great sponsors
-
metamask-extension
:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
-
extension
Simple browser extension for managing Polkadot and Substrate network accounts in a browser. Allows the signing of extrinsics using these accounts. Also provides a simple interface for compliant extensions for dapps. (by polkadot-js)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Use a content script. The content script injects another script which runs on pageload, which attaches the provider to the window object. You can see that here https://github.com/MetaMask/metamask-extension/blob/develop/app/scripts/contentscript.js
The metamask version is quite complicated. You might find it easier to understand the polkadot version of the same thing: https://github.com/polkadot-js/extension/blob/master/packages/extension/src/content.ts