browsh

package
v0.0.0-...-cb3ddd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: LGPL-2.1 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// IsTesting is used in tests, so it needs to be exported
	IsTesting        = false
	IsHTTPServerMode = false
)
View Source
var CurrentTab *tab

CurrentTab is the currently active tab in the TTY browser

View Source
var (
	IsConnectedToWebExtension = false
)
View Source
var (

	// IsMonochromeMode decides whether to render the TTY in full colour or monochrome
	IsMonochromeMode = false
)
View Source
var Tabs = make(map[int]*tab)

Tabs is a map of all tab data

Functions

func HTTPServerStart

func HTTPServerStart()

HTTPServerStart starts the HTTP server is a seperate service from the usual interactive TTY app. It accepts normal HTTP requests and uses the path portion of the URL as the entry to the Browsh URL bar. It then returns a simple line-broken text version of whatever the browser loads. So for example, if you request `curl browsh-http-service.com/http://something.com`, it will return: `Something `

func Initialise

func Initialise()

Initialise browsh

func Log

func Log(message string)

func MainEntry

func MainEntry()

MainEntry decides between running Browsh as a CLI app or as an HTTP web server

func ResetTabs

func ResetTabs()

func Shell

func Shell(command string) string

Shell provides nice and easy shell commands

func Shutdown

func Shutdown(err error)

Shutdown tries its best to cleanly shutdown browsh and the associated browser

func StartFirefox

func StartFirefox()

func TTYStart

func TTYStart(injectedScreen tcell.Screen)

TTYStart starts Browsh

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL