From 6c5393a772d713683e4480b0e5634b4fc9ce760d Mon Sep 17 00:00:00 2001 From: moond4rk Date: Thu, 3 Dec 2020 12:36:55 +0800 Subject: [PATCH] support vivaldi browser Close #51 --- core/browser.go | 1 + core/browser_darwin.go | 8 ++++++++ core/browser_linux.go | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/core/browser.go b/core/browser.go index df37274..48586b1 100644 --- a/core/browser.go +++ b/core/browser.go @@ -20,6 +20,7 @@ const ( braveName = "Brave" operaName = "Opera" operaGXName = "OperaGX" + vivaldiName = "Vivaldi" ) type Browser interface { diff --git a/core/browser_darwin.go b/core/browser_darwin.go index 710d06e..905ccf6 100644 --- a/core/browser_darwin.go +++ b/core/browser_darwin.go @@ -17,6 +17,7 @@ const ( braveProfilePath = "/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/*/" operaProfilePath = "/Users/*/Library/Application Support/com.operasoftware.Opera/" operaGXProfilePath = "/Users/*/Library/Application Support/com.operasoftware.OperaGX/" + vivaldiProfilePath = "/Users/*/Library/Application Support/Vivaldi/*/" ) const ( @@ -25,6 +26,7 @@ const ( edgeStorageName = "Microsoft Edge" braveStorageName = "Brave" operaStorageName = "Opera" + vivaldiStorageName = "Vivaldi" ) var ( @@ -76,6 +78,12 @@ var ( Storage: operaStorageName, New: NewChromium, }, + "vivaldi": { + ProfilePath: vivaldiProfilePath, + Name: vivaldiName, + Storage: vivaldiStorageName, + New: NewChromium, + }, } ) diff --git a/core/browser_linux.go b/core/browser_linux.go index c21d618..4fb3208 100644 --- a/core/browser_linux.go +++ b/core/browser_linux.go @@ -17,6 +17,7 @@ const ( braveProfilePath = "/home/*/.config/BraveSoftware/Brave-Browser/*/" chromeBetaProfilePath = "/home/*/.config/google-chrome-beta/*/" operaProfilePath = "/home/*/.config/opera/" + vivaldiProfilePath = "/home/*/.config/vivaldi/*/" ) const ( @@ -25,6 +26,7 @@ const ( braveStorageName = "Brave Safe Storage" chromeBetaStorageName = "Chrome Safe Storage" operaStorageName = "Chromium Safe Storage" + vivaldiStorageName = "Chrome Safe Storage" ) var ( @@ -70,6 +72,12 @@ var ( Storage: operaStorageName, New: NewChromium, }, + "vivaldi": { + ProfilePath: vivaldiProfilePath, + Name: vivaldiName, + Storage: vivaldiStorageName, + New: NewChromium, + }, } )