feat: Support browser and chrome styles for mv2 popups

This commit is contained in:
Aaron Klinker
2023-06-24 19:31:52 -05:00
parent 8eb4e86b91
commit 7945c94deb
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -123,6 +123,8 @@ export interface OptionsEntrypoint extends BaseEntrypoint {
type: 'options';
options: {
openInTab?: boolean;
browserStyle?: boolean;
chromeStyle?: boolean;
};
}
+5 -1
View File
@@ -214,7 +214,11 @@ function addEntrypoints(
if (options) {
const page = getEntrypointBundlePath(options, config.outDir, '.html');
manifest.options_ui = {
...options.options,
open_in_tab: options.options.openInTab,
browser_style:
config.browser === 'firefox' ? options.options.browserStyle : undefined,
chrome_style:
config.browser === 'chromium' ? options.options.chromeStyle : undefined,
page,
};
}