browser

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSummary

func CreateSummary(info []BrowserInfo) []int

Creates summary list containing all tabs open in every open window from all given.

Types

type AbstractBrowser

type AbstractBrowser struct {
	Browser
	// contains filtered or unexported fields
}

func (*AbstractBrowser) GetName

func (browser *AbstractBrowser) GetName() string

func (*AbstractBrowser) GetState

func (browser *AbstractBrowser) GetState() BrowserState

type Browser

type Browser interface {
	GetName() string
	GetState() BrowserState
	GetherWindowData() []WindowInfo
}

func GetAvailableBrowsers

func GetAvailableBrowsers() []Browser

func GetChromiumBrowser

func GetChromiumBrowser() Browser

ToDo; Wip → implement this!

func GetFirefoxBrowser

func GetFirefoxBrowser() Browser

func GetFirefoxDeveloperBrowser

func GetFirefoxDeveloperBrowser() Browser

type BrowserInfo

type BrowserInfo struct {
	Name    string
	IsOpen  BrowserState
	Windows []WindowInfo
}

func (*BrowserInfo) TotalTabs

func (info *BrowserInfo) TotalTabs() int

Get the total number of tabs within this browser.

type BrowserState

type BrowserState int
const (
	BROWSER_CLOSED BrowserState = iota
	BROWSER_OPEN
	BROWSER_STATE_UNKNOWN = -1
)

type ChromiumBrowser

type ChromiumBrowser struct {
	*AbstractBrowser
}

func (*ChromiumBrowser) GetherWindowData

func (browser *ChromiumBrowser) GetherWindowData() []WindowInfo

Yet unimplemented. Will parse the chrome session file to get the tab information within.

type FirefoxBrowser

type FirefoxBrowser struct {
	*AbstractBrowser
}

func (*FirefoxBrowser) GetherWindowData

func (browser *FirefoxBrowser) GetherWindowData() []WindowInfo

type FirefoxDeveloperBrowser

type FirefoxDeveloperBrowser struct {
	*FirefoxBrowser
}

type WindowInfo

type WindowInfo struct {
	TabCount int
}

Jump to

Keyboard shortcuts

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