Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
srcDir: "src",
targetBrowsers: ["chrome", "firefox", "opera", "edge"],
manifestVersion: 3,
manifest: {
manifest: ({ browser }) => ({
browser_specific_settings: {
gecko: {
id: "@jabfox",
Expand Down Expand Up @@ -38,26 +38,30 @@ export default defineConfig({
"96": "/JabRef-icon-96.png",
"128": "/JabRef-icon-128.png",
},
key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAimiMLZZCsf+p92UUzQRWYljtoUk0a9AuN+D3TJTFcm1BEDXKIDVmWG20S4yLQyYs8kWao3eTSdYykgsZLPtay1pFKtoM4csGB6sEOO+h25Nv/AU7pN5yH5PqcTIGkuH6AsQQQTPS1Y+vDfz+548oVXzK033l6ernhKRj4dngueZyQX89U38zkorq0/PPWfE8ppPzXiWo1Pn5C5scgzaHSfavIkbBpWuiJw6moSoYw4UxzmU6FmzjM/c8Ags/QPU/8M3BeC1eigStifBDkuIIDQtMtiTXEgCqHjIacB3uB7SJKL+0wsoREqoz3cX7uNLnB+DKu+s0OZKVah8gkliBLQIDAQAB",
...(browser !== "firefox"
? {
key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAimiMLZZCsf+p92UUzQRWYljtoUk0a9AuN+D3TJTFcm1BEDXKIDVmWG20S4yLQyYs8kWao3eTSdYykgsZLPtay1pFKtoM4csGB6sEOO+h25Nv/AU7pN5yH5PqcTIGkuH6AsQQQTPS1Y+vDfz+548oVXzK033l6ernhKRj4dngueZyQX89U38zkorq0/PPWfE8ppPzXiWo1Pn5C5scgzaHSfavIkbBpWuiJw6moSoYw4UxzmU6FmzjM/c8Ags/QPU/8M3BeC1eigStifBDkuIIDQtMtiTXEgCqHjIacB3uB7SJKL+0wsoREqoz3cX7uNLnB+DKu+s0OZKVah8gkliBLQIDAQAB",
}
: {}),
name: "JabRef Browser Extension",
permissions: [
"<all_urls>",
"scripting",
"activeTab",
"tabs",
"storage",
"nativeMessaging",
"offscreen",
"downloads",
"webRequest",
"declarativeNetRequest",
...(browser !== "firefox" ? ["offscreen"] : []),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to change this to "browser == chrome => offscreen included". But for now that's okay.

@ryan-carpenter ryan-carpenter Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude originally suggested browser === 'chrome' ? ['offscreen'] and browser === "chrome" || browser === "edge" || browser === "opera" ? ["offscreen"].

I reversed this and excluded Firefox, to grant the permission to chromium-based browsers without listing them explicitly. Failing to provide permission to a chromium browser could break functionality, whereas granting permission to a Firefox/Gecko browser only produces a warning that users don't see. Firefox can't use the permission in any case, so if the extension depends on this, it has to be provided another way.

],
web_accessible_resources: [
{
matches: ["<all_urls>"],
resources: ["sandbox.js", "translators/*.js"],
},
],
},
}),
webExt: {
openDevtools: true,
startUrls: [
Expand Down
Loading