From c92e067ccc6a4ae4a898727f7e0edffcef1d743f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8D=E1=B4=8F=E1=B4=8F=C9=B4D4=CA=80=E1=B4=8B?= Date: Thu, 9 Dec 2021 15:53:47 +0800 Subject: [PATCH] feat: add yandex browser for windows, Close #90 --- core/browser.go | 1 + core/browser_windows.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/core/browser.go b/core/browser.go index 19988cf..63eb97f 100644 --- a/core/browser.go +++ b/core/browser.go @@ -28,6 +28,7 @@ const ( operaGXName = "OperaGX" vivaldiName = "Vivaldi" coccocName = "CocCoc" + yandexName = "Yandex" ) type Browser interface { diff --git a/core/browser_windows.go b/core/browser_windows.go index 6b1482a..faa8d81 100644 --- a/core/browser_windows.go +++ b/core/browser_windows.go @@ -38,6 +38,8 @@ const ( vivaldiKeyPath = "/AppData/Local/Vivaldi/Local State" coccocProfilePath = "/AppData/Local/CocCoc/Browser/User Data/Default/" coccocKeyPath = "/AppData/Local/CocCoc/Browser/Local State" + yandexProfilePath = "/AppData/Local/Yandex/YandexBrowser/User Data/Default" + yandexKeyPath = "/AppData/Local/Yandex/YandexBrowser/Local State" ) var ( @@ -137,6 +139,12 @@ var ( Name: coccocName, New: NewChromium, }, + "yandex": { + ProfilePath: os.Getenv("USERPROFILE") + yandexProfilePath, + KeyPath: os.Getenv("USERPROFILE") + yandexKeyPath, + Name: yandexName, + New: NewChromium, + }, } )