How to Detect Failed Requests via Web Extensions / / No Comments One of the best things that ever happened to t he user experience of the web has been web extensions. Browsers are powerful but extensions bring a new level of functionality. Whether it’s crypto wallets, media players, or other popular plugins, web extensions have become essential to every day tasks. Working on MetaMask, I am thrust into a world of making everything Ethereum-centric work. One of those functionalities is ensuring that .eth domains resolve to ENS when input to the address bar. Requests to https://vitalik.ethnaturally fail, since .eth isn’t a natively supported top level domain, so we need to intercept this errant request. // Add an onErrorOccurred event via the... more → Posted in: JavaScript Tagged with: Detect, Extensions, Failed, Requests
How to Inject a Global with Web Extensions in Manifest V3 / / No Comments For those of you not familiar with the world of web extension development, a storm is brewing with Chrome. Google will stop support for manifest version 2, which is what the vast majority of web extensions use. Manifest version 3 sees many changes but the largest change is moving from persistent background scripts to service workers. This…is…a…massive…change. Changes from manifest version 2 to version 3 include: Going from persistent background script to a service worker that can die after 5 minutes No use of <iframe elements or other DOM APIs from the service worker All APIs have become Promise-based Restrictions on content from a CSP perspective One function that... more → Posted in: JavaScript Tagged with: Extensions, global, Inject, Manifest