This provides sample codes for a cross-browser extension app built on Blazor WASM. This sample app originally started for building a Chrome extension with Blazor WASM, but it now does the cross-browser support including Chromium-based browsers and Mozilla FireFox.
This sample code includes Mozilla's WebExtension browser
API Polyfill, which is licensed under MPL 2.0.
-
Build the app
dotnet build .
-
Publish the app
dotnet publish ./src/ChromeExtensionV2/ -c Release -o published
-
Run PowerShell script
./Run-PostBuild.ps1
-
Register the extension to your Chromium-based browser like Chrome or Edge, or Mozilla FireFox.
-
Visit any website on https://developer.chrome.com, https://developer.mozilla.org or https://docs.microsoft.com.
-
Run the extension by clicking the icon at the top of your web browser.