feat: add coccoc for windows and macOS Close #98

pull/116/head
ᴍᴏᴏɴD4ʀᴋ 3 years ago
parent 104d2622a8
commit a9f36d6524
  1. 1
      core/browser.go
  2. 8
      core/browser_darwin.go
  3. 8
      core/browser_windows.go

@ -27,6 +27,7 @@ const (
operaName = "Opera" operaName = "Opera"
operaGXName = "OperaGX" operaGXName = "OperaGX"
vivaldiName = "Vivaldi" vivaldiName = "Vivaldi"
coccocName = "CocCoc"
) )
type Browser interface { type Browser interface {

@ -23,6 +23,7 @@ const (
operaProfilePath = "/Users/*/Library/Application Support/com.operasoftware.Opera/" operaProfilePath = "/Users/*/Library/Application Support/com.operasoftware.Opera/"
operaGXProfilePath = "/Users/*/Library/Application Support/com.operasoftware.OperaGX/" operaGXProfilePath = "/Users/*/Library/Application Support/com.operasoftware.OperaGX/"
vivaldiProfilePath = "/Users/*/Library/Application Support/Vivaldi/*/" vivaldiProfilePath = "/Users/*/Library/Application Support/Vivaldi/*/"
coccocProfilePath = "/Users/*/Library/Application Support/Coccoc/*/"
) )
const ( const (
@ -33,6 +34,7 @@ const (
braveStorageName = "Brave" braveStorageName = "Brave"
operaStorageName = "Opera" operaStorageName = "Opera"
vivaldiStorageName = "Vivaldi" vivaldiStorageName = "Vivaldi"
coccocStorageName = "CocCoc"
) )
var ( var (
@ -116,6 +118,12 @@ var (
Storage: vivaldiStorageName, Storage: vivaldiStorageName,
New: NewChromium, New: NewChromium,
}, },
"coccoc": {
ProfilePath: coccocProfilePath,
Name: coccocName,
Storage: coccocStorageName,
New: NewChromium,
},
} }
) )

@ -36,6 +36,8 @@ const (
operaGXKeyPath = "/AppData/Roaming/Opera Software/Opera GX Stable/Local State" operaGXKeyPath = "/AppData/Roaming/Opera Software/Opera GX Stable/Local State"
vivaldiProfilePath = "/AppData/Local/Vivaldi/User Data/Default/" vivaldiProfilePath = "/AppData/Local/Vivaldi/User Data/Default/"
vivaldiKeyPath = "/AppData/Local/Vivaldi/Local State" vivaldiKeyPath = "/AppData/Local/Vivaldi/Local State"
coccocProfilePath = "/AppData/Local/CocCoc/Browser/User Data/Default/"
coccocKeyPath = "/AppData/Local/CocCoc/Browser/Local State"
) )
var ( var (
@ -129,6 +131,12 @@ var (
Name: vivaldiName, Name: vivaldiName,
New: NewChromium, New: NewChromium,
}, },
"coccoc": {
ProfilePath: os.Getenv("USERPROFILE") + coccocProfilePath,
KeyPath: os.Getenv("USERPROFILE") + coccocKeyPath,
Name: coccocName,
New: NewChromium,
},
} }
) )

Loading…
Cancel
Save