-
-
Notifications
You must be signed in to change notification settings - Fork 372
Open
Feature
Copy link
Labels
contribution welcomegood first issueWant to contribute to WXT? This is a good place to startWant to contribute to WXT? This is a good place to start
Description
Feature Request
For favicon feature: https://developer.chrome.com/docs/extensions/how-to/ui/favicons
Currently, if we want to use this, we have to do following steps:
- Update permissions in wxt.config.ts to include
favicon
- Update
web_accessible_resources
in manifest to allow_favicon/*
- We have to add
@ts-ignore
or@ts-expect-error
when requesting favicon url (since it's not allowed by.wxt/types/paths.d.ts
)
function getFaviconUrl(url: string, size = 16) {
//@ts-expect-error not supported by wxt now
const u = new URL(browser.runtime.getURL("/_favicon/"));
u.searchParams.set("pageUrl", url);
u.searchParams.set("size", size.toString());
return u.toString();
}
I expect to use this feature as easily as just adding the favicon
permission.
Is your feature request related to a bug?
N/A
What are the alternatives?
N/A
Additional context
N/A
Metadata
Metadata
Assignees
Labels
contribution welcomegood first issueWant to contribute to WXT? This is a good place to startWant to contribute to WXT? This is a good place to start