Skip to content

Commit

Permalink
Fix for Viper's lowercasing of config keys :/
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jun 18, 2019
1 parent fc92642 commit f290601
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
11 changes: 9 additions & 2 deletions interfacer/src/browsh/config_sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ use-existing = false
with-gui = false
# Config that you might usually set through Firefox's 'about:config' page
[firefox-config]
# "privacy.resistFingerprinting" = true
# Note that string must be wrapped in quotes
# preferences = [
# "privacy.resistFingerprinting=true",
# "network.proxy.http='localhost'",
# "network.proxy.ssl='localhost'",
# "network.proxy.http_port=8118",
# "network.proxy.ssl_port=8118",
# "network.proxy.type=1"
# ]
[tty]
# The time in milliseconds between requesting a new TTY-sized pixel frame.
Expand Down
8 changes: 5 additions & 3 deletions interfacer/src/browsh/firefox.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ func readMarionette() {
buffer := make([]byte, 4096)
count, err := marionette.Read(buffer)
if err != nil {
Shutdown(err)
Log("Error reading from Marionette connection")
return
}
Log("FF-MRNT: " + string(buffer[:count]))
}
Expand All @@ -277,8 +278,9 @@ func setDefaultFirefoxPreferences() {
for key, value := range defaultFFPrefs {
setFFPreference(key, value)
}
for key, value := range viper.GetStringMapString("firefox-config") {
setFFPreference(key, value)
for _, pref := range viper.GetStringSlice("firefox.preferences") {
parts := strings.SplitN(pref, "=", 2)
setFFPreference(parts[0], parts[1])
}
}

Expand Down
2 changes: 1 addition & 1 deletion interfacer/src/browsh/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package browsh

var browshVersion = "1.6.0"
var browshVersion = "1.6.1"

0 comments on commit f290601

Please sign in to comment.