Skip to content

Commit

Permalink
Major: Update WebExtensions.Net to v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyaulee committed Sep 17, 2024
1 parent 8e6418f commit 59ebc09
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/Pages/01_03_ExtensionAPIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ When you create a new Razor page, add `@inherits BasePage` on top to get access
string optionsPageUrl = null;
async Task GetOptionsPageUrl()
{
optionsPageUrl = await WebExtensions.Runtime.GetURL("options.html");
optionsPageUrl = WebExtensions.Runtime.GetURL("options.html");
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/Pages/01_04_RunningAndDebugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MockResolvers.Configure(configure =>
```

The [WebExtensions.Net page](https://github.com/mingyaulee/WebExtensions.Net) shows more examples of configuring the `MockResolvers`.
Some APIs have been mocked by default in [WebExtensions.Net `DefaultMockResolver`](https://github.com/mingyaulee/WebExtensions.Net/blob/09eb19608f5310f3d5b1b9b889f8d3378a13eb06/src/WebExtensions.Net/Mock/Resolvers/DefaultMockResolver.cs#L56).
Some APIs have been mocked by default in [WebExtensions.Net `DefaultMockResolver`](https://github.com/mingyaulee/WebExtensions.Net/blob/3eef452e6e36f3320c7c5a14dc6862223b714a06/src/WebExtensions.Net/Mock/Resolvers/DefaultMockResolver.cs#L55).

> **Important Note**
>
Expand Down
2 changes: 1 addition & 1 deletion docs/Pages/01_06_SetupExistingProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can set up the project manually as well, if for some reason you encounter an

async Task OnInstalled()
{
var indexPageUrl = await WebExtensions.Runtime.GetURL("index.html");
var indexPageUrl = WebExtensions.Runtime.GetURL("index.html");
await WebExtensions.Tabs.Create(new()
{
Url = indexPageUrl
Expand Down
2 changes: 1 addition & 1 deletion docs/Pages/03_02_BackgroundWorker.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial class BackgroundWorker : BackgroundWorkerBase

async Task OnInstalled()
{
var indexPageUrl = await WebExtensions.Runtime.GetURL("index.html");
var indexPageUrl = WebExtensions.Runtime.GetURL("index.html");
await WebExtensions.Tabs.Create(new()
{
Url = indexPageUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public override void Main()

async Task OnInstalled()
{
var indexPageUrl = await WebExtensions.Runtime.GetURL("index.html");
var indexPageUrl = WebExtensions.Runtime.GetURL("index.html");
await WebExtensions.Tabs.Create(new()
{
Url = indexPageUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public override void Main()

async Task OnInstalled()
{
var indexPageUrl = await WebExtensions.Runtime.GetURL("index.html");
var indexPageUrl = WebExtensions.Runtime.GetURL("index.html");
await WebExtensions.Tabs.Create(new()
{
Url = indexPageUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazor.BrowserExtension" Version="1.*" />
<PackageReference Include="Blazor.BrowserExtension" Version="2.*" />
<!--#if (IsNet6) -->
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.*" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
await base.OnInitializedAsync();
// this opens index.html in the extension as a new tab when the background page is loaded
var extensionUrl = await WebExtensions.Runtime.GetURL("index.html");
var extensionUrl = WebExtensions.Runtime.GetURL("index.html");
await WebExtensions.Tabs.Create(new CreateProperties
{
Url = extensionUrl
Expand Down
2 changes: 1 addition & 1 deletion src/Blazor.BrowserExtension/Blazor.BrowserExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<PackageReference Condition="'$(TargetFramework)' == 'net7.0'" Include="Microsoft.JSInterop" Version="7.0.0" />
<PackageReference Condition="'$(TargetFramework)' == 'net6.0'" Include="Microsoft.JSInterop" Version="6.0.0" />
<PackageReference Include="JsBind.Net.Extensions.DependencyInjection" Version="1.0.3" PrivateAssets="contentfiles" />
<PackageReference Include="WebExtensions.Net.Extensions.DependencyInjection" Version="2.1.1" PrivateAssets="contentfiles" />
<PackageReference Include="WebExtensions.Net.Extensions.DependencyInjection" Version="3.0.0" PrivateAssets="contentfiles" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Blazor.BrowserExtension/Pages/BackgroundPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected override async Task OnInitializedAsync()
}
}))
{
await WebExtensions.WebRequest.OnBeforeRequest.AddListener(
WebExtensions.WebRequest.OnBeforeRequest.AddListener(
HandleBeforeRequestChange,
new RequestFilter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public override void Main()

async Task OnInstalled()
{
var indexPageUrl = await WebExtensions.Runtime.GetURL("index.html");
var indexPageUrl = WebExtensions.Runtime.GetURL("index.html");
await WebExtensions.Tabs.Create(new()
{
Url = indexPageUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
await base.OnInitializedAsync();

// Navigate to extension index page on load
var extensionUrl = await WebExtensions.Runtime.GetURL("");
var extensionUrl = WebExtensions.Runtime.GetURL("");
await WebExtensions.Tabs.Create(new CreateProperties
{
Url = extensionUrl
Expand Down

0 comments on commit 59ebc09

Please sign in to comment.