How to Inject a Global with Web Extensions in Manifest V3

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

How to Get Extension Manifest Information

Working on a web extension can be kinda wild — on one side you’re essentially just coding a website, on the other side you’re limited to what the browser says you can do in the extension execution environment. One change in that environment is coming January 2023 — pushing extensions to move to manifest version 3. I recently got curious about whether other popular extensions had completed the version 3 update. Executing the following command in the background page (manifest version 2) or service worker (version 3) will provide you the extension’s manifest: chrome.runtime.getManifest() The getManifest call returns a large object detailing the extension’s... more →
Posted in: JavaScript