Skip to content

Commit

Permalink
Added specific id to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
BatteredBunny committed Aug 6, 2023
1 parent 515ccea commit 429533f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion native/manifest/manifest_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const genericManifest = `{
}`

const chromiumID = "chrome-extension://nbnfihffeffdhcbblmekelobgmdccfnl/"
const edgeID = "chrome-extension://dboagbeogaikhnjldgdighffjfejpeoj/"
const firefoxID = "[email protected]"

func buildManifestFirefox(path string) []byte {
Expand All @@ -31,6 +32,10 @@ func buildManifestChromium(path string) []byte {
return []byte(fmt.Sprintf(genericManifest, path, "allowed_origins", chromiumID))
}

func buildManifestEdge(path string) []byte {
return []byte(fmt.Sprintf(genericManifest, path, "allowed_origins", edgeID))
}

func expandPath(p string) (res string, err error) {
user, err := user.Current()
if err != nil {
Expand Down Expand Up @@ -70,9 +75,11 @@ func Install() (err error) {

var builtManifest []byte
switch name {
case "edge":
builtManifest = buildManifestEdge(binaryLocation)
case "tor-browser", "librewolf", "firefox":
builtManifest = buildManifestFirefox(binaryLocation)
case "chrome", "chromium", "vivaldi", "edge":
case "chrome", "chromium", "vivaldi":
builtManifest = buildManifestChromium(binaryLocation)
}

Expand Down

0 comments on commit 429533f

Please sign in to comment.