Open newbe36524 opened 3 years ago
Wow, it sounds so cool! And, that's interesting!
Yes, I'll consider supporting creating a browser extension scenario, particularly improve loading JavaScript helper code to be more flexible.
But I'm afraid it will take a while due to this library is just my weekend hobby works.
I appreciate your understanding!
@newbe36524
I released the new version of "Blazor HotKeys", ver.11.1.0.
I made this version to be able to disable automatic injection of the client-side script, instead of changing the path of that.
Maybe you can use "Blazor HotKeys" for your browser extension project with the following step.
<!-- This is "Newbe.BookmarkManager.csproj" file -->
...
<ItemGroup>
...
<!-- 👇 Add this. -->
<PackageReference Include="Toolbelt.Blazor.HotKeys" Version="11.1.0" />
</ItemGroup>
<script>
tag manually to load the client-side script of "Blazor HotKeys" by yourself.<!-- This is "wwwroot/index.html" file -->
...
<!-- 👇 Add this. -->
<script src="content/Toolbelt.Blazor.HotKeys/script.min.js"></script>
</body>
...
DisableClientScriptAutoInjection
option for the HotKeys service to true
.// This is "Program.cs"
...
public static async Task Main(string[] args)
{
...
// 👇 Add this
builder.Services.AddHotKeys(options =>
{
options.DisableClientScriptAutoInjection = true;
});
...
I hope this will helps you!
WOW, it is cool, I will add a new story to make it done in the next sprint. And I will get back to you if it works.
I am developing a Chrome extension with Blazor, and
_content
folder is forbidden to load in browser extension since it is build in restriction. So, I need to load js from some folder likecontent
instead of_content
.You can check out my source code to see what I am doing at https://github.com/Amazing-Favorites/Amazing-Favorites if you are interested in