firefox

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Configuration

Index

Constants

View Source
const (
	DefaultProfile = "default"

	// Default flavour to use
	BrowserName = "firefox"
)
View Source
const (
	WatchMinJobInterval = 1500 * time.Millisecond
	TagsBranchName      = mozilla.TagsBranchName // name of the `tags` branch in the node tree
)
View Source
const (
	FirefoxProfileFlag = "ff-profile"
)

Variables

View Source
var FirefoxCmds = &cli.Command{
	Name:    "firefox",
	Aliases: []string{"ff"},
	Usage:   "firefox related commands",
	Commands: []*cli.Command{
		&ffVFSCommands,
	},
}

Functions

This section is empty.

Types

type AutoIncr

type AutoIncr struct {
	ID sqlid
}

type Firefox

type Firefox struct {
	*FirefoxConfig

	// All elements stored in URLIndex
	URLIndexList []string

	parsing.Counter
	// contains filtered or unexported fields
}

func NewFirefox

func NewFirefox() *Firefox

func (Firefox) Config

func (f Firefox) Config() *modules.BrowserConfig

func (*Firefox) GetCurFlavour

func (f *Firefox) GetCurFlavour() *browsers.BrowserDef

GetCurFlavour implements profiles.ProfileManager.

func (*Firefox) GetProfile

func (f *Firefox) GetProfile() *profiles.Profile

func (*Firefox) GetProfiles

func (*Firefox) GetProfiles(flavour string) ([]*profiles.Profile, error)

GetProfiles implements the profiles.ProfileManager interface

func (*Firefox) Init

func (f *Firefox) Init(ctx *modules.Context, p *profiles.Profile) error

func (*Firefox) ListFlavours

func (firefox *Firefox) ListFlavours() []browsers.BrowserDef

func (Firefox) ModInfo

func (f Firefox) ModInfo() modules.ModInfo

func (*Firefox) PreLoad

func (f *Firefox) PreLoad(_ *modules.Context) error

Firefox custom logic for preloading the bookmarks when the browser module starts. Implements modules.PreLoader interface.

func (*Firefox) Run

func (ff *Firefox) Run()

Implements modules.Runner interface

func (*Firefox) Shutdown

func (f *Firefox) Shutdown() error

Implement modules.Shutdowner

func (*Firefox) UseProfile

func (f *Firefox) UseProfile(p *profiles.Profile, flv *browsers.BrowserDef) error

func (*Firefox) Watch

func (f *Firefox) Watch() *watch.WatchDescriptor

func (*Firefox) WatchAllProfiles

func (f *Firefox) WatchAllProfiles() bool

type FirefoxConfig

type FirefoxConfig struct {
	// Default data source name query options for `places.sqlite` db
	PlacesDSN database.DsnOptions `toml:"-"`

	modules.ProfilePrefs `toml:"profile-options" mapstructure:"profile-options"`

	CustomProfiles []profiles.CustomProfile `toml:"custom-profiles" mapstructure:"custom-profiles"`

	//TEST: ignore this field in config.Configurator interface
	// Embed base browser config
	*modules.BrowserConfig `toml:"-"`
}

FirefoxConfig implements the Configurator interface which allows it to register and set field through the Configurator.

It is also used alongside cmd_flags.go to dynamically register cli flags that can change this config (struct fields) from command line at runtime.

The struct schema defines the parameters to pass on to firefox that can be overriden by users. Options defined here will automatically supported in the config.toml file as well as the command line flags. New command line flags or config file options will only be accepted if they are defined here.

var (

	// firefox global config state.
	FFConfig *FirefoxConfig

	FirefoxProfileManager = mozilla.NewMozProfileManager(
		ffProfileLoader,
	)
)

func NewFirefoxConfig

func NewFirefoxConfig() *FirefoxConfig

type MozBookmark

type MozBookmark = mozilla.MozBookmark

type MozFolder

type MozFolder = mozilla.MozFolder

Jump to

Keyboard shortcuts

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