Blazor.BrowserExtension

Build browser extensions easily with Blazor.

MIT License

Stars
330
Committers
6

Bot releases are hidden (Show)

Blazor.BrowserExtension - v0.12.2

Published by mingyaulee 12 months ago

Blazor.BrowserExtension - v0.12.1

Published by mingyaulee 12 months ago

Blazor.BrowserExtension - v0.12.0

Published by mingyaulee almost 1 year ago

Breaking changes:

  • .Net 5.0 support is now dropped
  • Initial support for .Net 8.0

Full Changelog: https://github.com/mingyaulee/Blazor.BrowserExtension/compare/v0.11.0...v0.12.0

Blazor.BrowserExtension - v0.11.0

Published by mingyaulee about 1 year ago

Breaking changes::

  • Custom initialization parameter is changed from environmentName: string to blazorStartOptions: object. Refer to the updated readme.

Release is marked as deprecated as the package has broken runtime.

Blazor.BrowserExtension - v0.10.7

Published by mingyaulee over 1 year ago

  • Reverted exclusion of brotli compression for dotnet.wasm
  • Use System.Text.Json for parsing manifest during validation
Blazor.BrowserExtension - v0.10.6

Published by mingyaulee over 1 year ago

  • Updated dotnet.js runtime to 7.0.3
  • Updated project dependencies
  • Fixed brotli decode error for dotnet.wasm
  • Updated template to match default Blazor app template
Blazor.BrowserExtension - v0.10.5

Published by mingyaulee almost 2 years ago

Updated blazor.boot.json replacement tokens as optional

Blazor.BrowserExtension - v0.10.4

Published by mingyaulee almost 2 years ago

Disabled Blazor caching by default to prevent taking up storage when loaded in content scripts.

Blazor.BrowserExtension - v0.10.3

Published by mingyaulee almost 2 years ago

Fixed paths in blazor.boot.json not replaced (Issue #46)

Blazor.BrowserExtension - v0.10.2

Published by mingyaulee about 2 years ago

Fixed publish process miss out removing some compressed files

Blazor.BrowserExtension - v0.10.0

Published by mingyaulee about 2 years ago

  • Added support for browser extension manifest V3.
  • Updated browser polyfill to v0.10.0
Blazor.BrowserExtension - v0.9.1

Published by mingyaulee over 2 years ago

Added .Net 7 as target framework

Blazor.BrowserExtension - v0.8.2

Published by mingyaulee almost 3 years ago

Fixed error when processing JSON static web assets manifest which has existing content or framework node (Issue #36)

Blazor.BrowserExtension - v0.8.1

Published by mingyaulee almost 3 years ago

  • Easier debugging without the need to change any part of the code
  • Updated WebExtensions.Net to v0.10.1
Blazor.BrowserExtension - v0.8.0

Published by mingyaulee almost 3 years ago

  • Added .Net 6 as target framework.
  • Updated JsBind.Net and WebExtensions.Net package reference version.
Blazor.BrowserExtension - v0.7.3

Published by mingyaulee almost 3 years ago

  • Updated JsBind.Net and WebExtensions.Net package reference version.
  • Fixed compatibility with .Net 6 runtime JavaScript file.
  • Updated template package reference version for .Net 6 target framework.
Blazor.BrowserExtension - v0.7.0

Published by mingyaulee about 3 years ago

  • Use config file instead of replacing tokens in JavaScript files
  • Script assets are now included as static web assets/RCL assets instead of linked files
  • Fix error when resolving XML static web asset path that contains relative path (i.e. basepath/../filepath)
  • Update JsBind.Net from v0.1.4 to v0.2.5 and WebExtensions.Net from v0.9.0 to v0.9.2

Breaking changes:

  • MsBuild property LinkBrowserExtensionAssetsPath is removed
  • Projects with content script need to use app.js pre-initialization script
  • Option is removed from the service dependency registration
  • Path to ContentScript.js and Core.js is changed from "BrowserExtensionScripts" to "content/Blazor.BrowserExtension"
  • Global variable in JavaScript to change initialization behaviour is now within the "BlazorBrowserExtension" object

Migration Guide:

  1. Update Program.cs to remove the configuration action in the .AddBrowserExtensionServices() parameter

    // Before
    builder.Services.AddBrowserExtensionServices(options =>
    {
        options.ProjectNamespace = typeof(Program).Namespace;
    });
    // After
    builder.Services.AddBrowserExtensionServices();
    
  2. Update index.html and manifest.json and anywhere with reference to the scripts from this package from "BrowserExtensionScripts/" to "content/Blazor.BrowserExtension/"

    <!-- Before -->
    <script src="BrowserExtensionScripts/Core.js"></script>
    <!-- After -->
    <script src="content/Blazor.BrowserExtension/Core.js"></script>
    
  3. "BrowserExtensionScripts/*" can be removed from the web_accessible_resources key in manifest.json

Projects with content scripts

  1. Add a new file named app.js under the directory wwwroot
  2. Add the following code into the new file.
    if (globalThis.BlazorBrowserExtension.BrowserExtension.Mode === globalThis.BlazorBrowserExtension.Modes.ContentScript) {
      const appDiv = document.createElement("div");
      appDiv.id = "My_Unique_Extension_App_Id"; // this ID should be the same as the container ID in the index.html file
      document.body.appendChild(appDiv);
    }
    
  3. Add "app.js" to the web_accessible_resources key in manifest.json

Projects with custom initialization behaviour
Move the initialization logic into app.js file. Refer to the readme to read on the way to change initialization behaviour in this version.

Blazor.BrowserExtension - v0.6.4

Published by mingyaulee about 3 years ago

Fix JsHttpClient request headers in fetch options

Blazor.BrowserExtension - v0.6.3

Published by mingyaulee about 3 years ago

Fix JSON StaticWebAssets manifest parser relative directory to preserve folder structure

Blazor.BrowserExtension - v0.6.2

Published by mingyaulee about 3 years ago

  • Read StaticWebAssets manifest in JSON format (introduced in .Net 6 RC1)
  • Handle manifest resource type when loading boot resources (to support .Net 6 RC1)
  • Fix JsHttpClient script not included in package
Package Rankings
Top 9.63% on Proxy.golang.org
Badges
Extracted from project README
Nuget GitHub Workflow Status Sonar Quality Gate
Related Projects