You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
3.3 KiB
117 lines
3.3 KiB
3 years ago
|
//go:build darwin
|
||
|
|
||
2 years ago
|
package browser
|
||
3 years ago
|
|
||
|
import (
|
||
2 years ago
|
"github.com/moond4rk/HackBrowserData/item"
|
||
3 years ago
|
)
|
||
|
|
||
|
var (
|
||
3 years ago
|
chromiumList = map[string]struct {
|
||
3 years ago
|
name string
|
||
|
storage string
|
||
|
profilePath string
|
||
3 years ago
|
items []item.Item
|
||
3 years ago
|
}{
|
||
|
"chrome": {
|
||
3 years ago
|
name: chromeName,
|
||
|
storage: chromeStorageName,
|
||
|
profilePath: chromeProfilePath,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"edge": {
|
||
3 years ago
|
name: edgeName,
|
||
|
storage: edgeStorageName,
|
||
|
profilePath: edgeProfilePath,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
3 years ago
|
"chromium": {
|
||
3 years ago
|
name: chromiumName,
|
||
|
storage: chromiumStorageName,
|
||
|
profilePath: chromiumProfilePath,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"chrome-beta": {
|
||
3 years ago
|
name: chromeBetaName,
|
||
|
storage: chromeBetaStorageName,
|
||
|
profilePath: chromeBetaProfilePath,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"opera": {
|
||
3 years ago
|
name: operaName,
|
||
|
profilePath: operaProfilePath,
|
||
|
storage: operaStorageName,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"opera-gx": {
|
||
3 years ago
|
name: operaGXName,
|
||
|
profilePath: operaGXProfilePath,
|
||
|
storage: operaStorageName,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"vivaldi": {
|
||
3 years ago
|
name: vivaldiName,
|
||
|
storage: vivaldiStorageName,
|
||
|
profilePath: vivaldiProfilePath,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"coccoc": {
|
||
3 years ago
|
name: coccocName,
|
||
|
storage: coccocStorageName,
|
||
|
profilePath: coccocProfilePath,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"brave": {
|
||
3 years ago
|
name: braveName,
|
||
|
profilePath: braveProfilePath,
|
||
|
storage: braveStorageName,
|
||
3 years ago
|
items: item.DefaultChromium,
|
||
3 years ago
|
},
|
||
|
"yandex": {
|
||
3 years ago
|
name: yandexName,
|
||
|
storage: yandexStorageName,
|
||
|
profilePath: yandexProfilePath,
|
||
3 years ago
|
items: item.DefaultYandex,
|
||
3 years ago
|
},
|
||
3 years ago
|
}
|
||
|
firefoxList = map[string]struct {
|
||
3 years ago
|
name string
|
||
|
storage string
|
||
|
profilePath string
|
||
3 years ago
|
items []item.Item
|
||
3 years ago
|
}{
|
||
|
"firefox": {
|
||
3 years ago
|
name: firefoxName,
|
||
|
profilePath: firefoxProfilePath,
|
||
|
items: item.DefaultFirefox,
|
||
3 years ago
|
},
|
||
|
}
|
||
|
)
|
||
|
|
||
|
var (
|
||
3 years ago
|
chromeProfilePath = homeDir + "/Library/Application Support/Google/Chrome/Default/"
|
||
|
chromeBetaProfilePath = homeDir + "/Library/Application Support/Google/Chrome Beta/Default/"
|
||
|
chromiumProfilePath = homeDir + "/Library/Application Support/Chromium/Default/"
|
||
|
edgeProfilePath = homeDir + "/Library/Application Support/Microsoft Edge/Default/"
|
||
|
braveProfilePath = homeDir + "/Library/Application Support/BraveSoftware/Brave-Browser/Default/"
|
||
|
operaProfilePath = homeDir + "/Library/Application Support/com.operasoftware.Opera/Default/"
|
||
|
operaGXProfilePath = homeDir + "/Library/Application Support/com.operasoftware.OperaGX/Default/"
|
||
|
vivaldiProfilePath = homeDir + "/Library/Application Support/Vivaldi/Default/"
|
||
|
coccocProfilePath = homeDir + "/Library/Application Support/Coccoc/Default/"
|
||
|
yandexProfilePath = homeDir + "/Library/Application Support/Yandex/YandexBrowser/Default/"
|
||
3 years ago
|
|
||
3 years ago
|
firefoxProfilePath = homeDir + "/Library/Application Support/Firefox/Profiles/"
|
||
3 years ago
|
)
|
||
3 years ago
|
|
||
3 years ago
|
const (
|
||
|
chromeStorageName = "Chrome"
|
||
|
chromeBetaStorageName = "Chrome"
|
||
|
chromiumStorageName = "Chromium"
|
||
|
edgeStorageName = "Microsoft Edge"
|
||
|
braveStorageName = "Brave"
|
||
|
operaStorageName = "Opera"
|
||
|
vivaldiStorageName = "Vivaldi"
|
||
|
coccocStorageName = "CocCoc"
|
||
|
yandexStorageName = "Yandex"
|
||
|
)
|