Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Support Extended "browser_specific_settings" #748

Closed
erosman opened this issue Jan 16, 2025 · 1 comment
Closed

Proposal: Support Extended "browser_specific_settings" #748

erosman opened this issue Jan 16, 2025 · 1 comment
Labels
opposed: chrome Opposed by Chrome opposed: firefox Opposed by Firefox opposed: safari Opposed by Safari

Comments

@erosman
Copy link

erosman commented Jan 16, 2025

Proposal: Support Extended "browser_specific_settings"

Background

Although the general consensus aims towards the unification of the manifest.json between browsers, there are properties that would remain browser-specific, nonetheless.

Proposal

The proposal is in two parts:

  • Support "browser_specific_settings"
  • Extend the coverage

Use Cases

1. strict min/max version

As mentioned in #115, set per browser "strict_min_version", "strict_max_version".

2. "background"

As discussed in #282, set "background", thus eliminating the need for "preferred_environment" e.g.

{
  
  "browser_specific_settings": {
    "firefox": {
      "background": {
        "scripts": ["background.js"],
        "type": "module"
      }
    },
    
    "chromium": {
      "background": {
        "service_worker": "worker.js",
        "type": "module"
      }
    },

    "opera": {
      "background": {
        "scripts": ["background.js"],
        "type": "module"
      }
    }
  }

}

3. Any property

Browsers to allow and apply any valid property that requires per-browser setting

{
  
  "browser_specific_settings": {
    "firefox": {
      "background": {
        "scripts": ["background.js"],
        "type": "module"
      },
      "icons": {
        "16": "icon.svg",
        "32": "icon.svg",
        "48": "icon.svg",
        "64": "icon.svg",
        "128": "icon.svg"
      },
      "permissions": [
        "browserSettings",
        "contextualIdentities"
      ],
      "strict_min_version": "14",
      "strict_max_version": "20"  
    },

    "chromium": {
      "background": {
        "service_worker": "worker.js",
        "type": "module"
      },      
      "icons": {
        "16": "icon.png",
        "32": "icon32.png",
        "48": "icon48.png",
        "64": "icon64.png",
        "128": "icon128.png"
      },
      "permissions": [
        "pageCapture"
      ],
      "strict_min_version": "14",
      "strict_max_version": "20" 
    }
  }

}
@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels Jan 16, 2025
@xeenon xeenon added opposed: safari Opposed by Safari and removed needs-triage: safari Safari needs to assess this issue for the first time labels Jan 16, 2025
@fregante
Copy link

IMHO If a developer needs this, they should just ship separate extensions. There's no need to place everything in one file if there's no overlap.

@Rob--W Rob--W added opposed: firefox Opposed by Firefox opposed: chrome Opposed by Chrome and removed needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: chrome Chrome needs to assess this issue for the first time labels Jan 16, 2025
@Rob--W Rob--W closed this as completed Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opposed: chrome Opposed by Chrome opposed: firefox Opposed by Firefox opposed: safari Opposed by Safari
Projects
None yet
Development

No branches or pull requests

4 participants