clipboard
editor
ff_cmdline
firstinpath
getBestEditor
getConfElsePref
getConfElsePrefElseDefault
getenv
getFirefoxDir
getNativeMessengerVersion
getPref
getPrefs
getProfile
getProfileDir
getProfileName
getProfileUncached
getrc
getrcpath
inpath
listDir
loadPrefs
mkdir
move
nativegate
parsePrefs
parseProfilesIni
pyeval
read
removePref
run
runAsync
sendNativeMsg
temp
unfixamo
winFirefoxRestart
write
writePref
writerc
  • Calls an external program, to either set or get the content of the X selection. When setting the selection or if getting it failed, will return an empty string.

    Parameters

    • action: "set" | "get"
    • str: string

    Returns Promise<string>

  • Parameters

    • file: string
    • line: number
    • col: number
    • Optionalcontent: string

    Returns Promise<any>

  • This returns the commandline that was used to start Firefox. You'll get both the binary (not necessarily an absolute path) and flags.

    Returns Promise<string[]>

  • Parameters

    • cmdarray: any

    Returns Promise<any>

  • Returns Promise<string>

  • Fetches a config option from the config. If the option is undefined, fetch a preference from preferences. It would make more sense for this function to be in config.ts but this would require importing this file in config.ts and Webpack doesn't like circular dependencies.

    Parameters

    • confName: string
    • prefName: string

    Returns Promise<any>

  • Fetches a config option from the config. If the option is undefined, fetch prefName from the preferences. If prefName is undefined too, return a default.

    Parameters

    • confName: string
    • prefName: string
    • def: any

    Returns Promise<any>

  • Parameters

    • variable: string

    Returns Promise<string>

  • Returns Promise<string>

  • Parameters

    • quiet: boolean = false

    Returns Promise<string>

  • Returns the value for the corresponding about:config setting

    Parameters

    • name: string

    Returns Promise<string>

  • Returns a promise for an object that should contain every about:config setting.

    Performance is slow so we need to cache the results.

    Returns Promise<{ [key: string]: string }>

  • Returns Promise<any>

  • Parameters

    • separator: "auto" | "unix" = "auto"

    Returns Promise<string>

  • Parameters

    • cmd: any

    Returns Promise<boolean>

  • Parameters

    • dir: string

    Returns Promise<MessageResp>

  • When given the name of a firefox preference file, will load said file and return a promise for an object the keys of which correspond to preference names and the values of which correspond to preference values. When the file couldn't be loaded or doesn't contain any preferences, will return a promise for an empty object.

    Parameters

    • filename: any

    Returns Promise<{ [key: string]: string }>

  • Parameters

    • dir: string
    • exist_ok: boolean

    Returns Promise<MessageResp>

  • Parameters

    • from: string
    • to: string
    • overwrite: boolean
    • cleanup: boolean

    Returns Promise<MessageResp>

  • Used internally to gate off functions that use the native messenger. Gives a helpful error message in the command line if the native messenger is not installed, or is the wrong version.

    Parameters

    • version: string = "0"

      A string representing the minimal required version.

    • interactive: boolean = true

      True if a message should be displayed on version mismatch.

    • desiredOS: string[] = ...

    Returns Promise<boolean>

    false if the required version is higher than the currently available native messenger version.

  • Parameters

    • prefFileContent: string

    Returns {}

  • Parameters

    • content: string
    • basePath: string

    Returns Promise<{}>

  • Evaluates a string in the native messenger. This has to be python code. If you want to run shell strings, use run() instead.

    Only works for native messenger versions < 0.2.0.

    Parameters

    • command: string

    Returns Promise<MessageResp>

  • Parameters

    • file: string

    Returns Promise<MessageResp>

  • Removes a preference from user.js

    Parameters

    • name: string

    Returns Promise<void>

  • Parameters

    • command: string
    • content: string = ""

    Returns Promise<MessageResp>

  • Parameters

    • command: string

    Returns Promise<void>

  • Posts using the one-time message API; native is killed after message returns

    Parameters

    • cmd: MessageCommand
    • opts: Record<string, unknown>
    • quiet: boolean = false

    Returns Promise<MessageResp>

  • Parameters

    • content: string
    • prefix: string

    Returns Promise<MessageResp>

  • Parameters

    • profiledir: string
    • browsercmd: string

    Returns Promise<MessageResp>

  • Parameters

    • file: string
    • content: string

    Returns Promise<MessageResp>

  • Writes a preference to user.js

    Parameters

    • name: string
    • value: any

    Returns Promise<void>

  • Parameters

    • file: string
    • force: boolean
    • content: string

    Returns Promise<MessageResp>