Chris Pakken
unread,Oct 4, 2024, 2:54:48 PM10/4/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions
In my extension, I am using vite (esbuild) to build and minify my code before I zip and submit for approval.
```ts
const browser = ((globalThis as any).browser || (globalThis as any).chrome) as typeof chrome
export const chromeTabs = browser.tabs
export const chromeWindows = browser.windows
export const chromeStorage = browser.storage
export const chromeCommands = browser.commands
export const chromeRuntime = browser.runtime
export const chromeDisplay = browser.system.display
export const chromeAction = browser.action
export const chromeAlarms = browser.alarms
export const chromeTabGroups = browser.tabGroups
export const chromeScripting = browser.scripting
export const chromeSessions = browser.sessions
```
I use this file to export all my chorme APIs, so that it can resolve some compatibility issues between firefox/chrome/edge (without using webextension polyfill) and also to minify imported file size since the variables are minified throughout the extensions (instead of using chrome.tabs, chromeTabs can be minified)
However when I submit the extension to the chrome store, I get 'Purple Potassium' violation, which says I am NOT using the following permissions(s), and it lists ALL the permissions I am requesting.
I think the webstore does not recognize or detect the way I am exporting the chrome variables and thinks I am not using the chrome apis at all.
Has anyone run into this issue? Do I have to replace these variables and explicitly use chrome.tabGroups (for example) for chrome webstore to recognize I am using tabGroups permission?