Review of webmode, corrections to error messages and comments

This commit is contained in:
asdf 2019-11-14 21:22:17 +11:00
parent 28c2d6b277
commit 9d29acc8e8
2 changed files with 3 additions and 2 deletions

View File

@ -1001,7 +1001,7 @@ func (c *client) handleWeb(u Url) {
if http.IsTextFile(u.Full) {
page, err := http.Visit(wm, u.Full, c.Width-1)
if err != nil {
c.SetMessage(fmt.Sprintf("Lynx error: %s", err.Error()), true)
c.SetMessage(fmt.Sprintf("%s error: %s", wm, err.Error()), true)
c.DrawMessage()
return
}
@ -1032,6 +1032,7 @@ func (c *client) handleWeb(u Url) {
} else {
c.SetMessage(msg, false)
}
c.DrawMessage()
default:
c.SetMessage("Current 'webmode' setting does not allow http/https", false)
c.DrawMessage()

View File

@ -53,7 +53,7 @@ var defaultOptions = map[string]string{
"theme": "normal", // "normal", "inverted"
"tlscertificate": "",
"tlskey": "",
"webmode": "none", // "none", "gui", "lynx", "w3m"
"webmode": "none", // "none", "gui", "lynx", "w3m", "elinks"
}
// homePath will return the path to your home directory as a string