Adds web support in lynx mode #60

Merged
sloum merged 7 commits from lynx-web-mode into develop 2019-10-27 14:15:57 +00:00
3 changed files with 4 additions and 5 deletions
Showing only changes of commit 231ccc36d3 - Show all commits

View File

@ -979,7 +979,7 @@ func (c *client) Visit(url string) {
} }
switch strings.ToUpper(c.Options["lynxmode"]) { switch strings.ToUpper(c.Options["lynxmode"]) {
case "TRUE": case "TRUE":
page, err := http.Visit(u.Full, c.Width - 1) page, err := http.Visit(u.Full, c.Width-1)
if err != nil { if err != nil {
c.SetMessage(fmt.Sprintf("Lynx error: %s", err.Error()), true) c.SetMessage(fmt.Sprintf("Lynx error: %s", err.Error()), true)
c.DrawMessage() c.DrawMessage()
@ -1057,7 +1057,6 @@ func (c *client) ReloadPage() error {
return nil return nil
} }
//------------------------------------------------\\ //------------------------------------------------\\
// + + + F U N C T I O N S + + + \\ // + + + F U N C T I O N S + + + \\
//--------------------------------------------------\\ //--------------------------------------------------\\

View File

@ -7,8 +7,8 @@ import (
) )
type page struct { type page struct {
Content string Content string
Links []string Links []string
} }
func Visit(url string, width int) (page, error) { func Visit(url string, width int) (page, error) {

View File

@ -1,6 +1,6 @@
package main package main
// Bombadillo is an internet client for the terminal of unix or // Bombadillo is an internet client for the terminal of unix or
// unix-like systems. // unix-like systems.
// //
// Copyright (C) 2019 Brian Evans // Copyright (C) 2019 Brian Evans