Index

Variables

Object literals

Variables

staticThemes

staticThemes: string[] = ["dark","default","greenmat","quake","shydactyl"]

Object literals

everything

everything: object

src/aliases.ts

src/aliases.ts: object

expandExstr

expandExstr: object

doc

doc: string[] = ["Expands the alias in the provided exstr recursively. Does nothing if\nthe command is not aliased, including when the command is invalid."]

type

type: string = "(exstr: string, aliases?: any, prevExpansions?: string[]) => string"

src/background.ts

src/background.ts: object

addCSPListener

addCSPListener: object

doc

doc: undefined[] = []

type

type: string = "() => void"

removeCSPListener

removeCSPListener: object

doc

doc: undefined[] = []

type

type: string = "() => void"

src/commandline_background.ts

src/commandline_background.ts: object

allWindowTabs

allWindowTabs: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any[]>"

currentWindowTabs

currentWindowTabs: object

doc

doc: string[] = ["Helpers for completions "]

type

type: string = "() => Promise<any[]>"

hide

hide: object

doc

doc: undefined[] = []

type

type: string = "(tabid?: any) => Promise<void>"

history

history: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any[]>"

recvExStr

recvExStr: object

doc

doc: string[] = ["Receive events from commandline_frame and pass to listeners "]

type

type: string = "(exstr: string) => void"

show

show: object

doc

doc: undefined[] = []

type

type: string = "(focus?: boolean) => Promise<void>"

src/commandline_content.ts

src/commandline_content.ts: object

blur

blur: object

doc

doc: undefined[] = []

type

type: string = "() => void"

executeWithoutCommandLine

executeWithoutCommandLine: object

doc

doc: undefined[] = []

type

type: string = "(fn: any) => any"

focus

focus: object

doc

doc: undefined[] = []

type

type: string = "() => void"

hide

hide: object

doc

doc: undefined[] = []

type

type: string = "() => void"

init

init: object

doc

doc: string[] = ["Initialise the cmdline_iframe element unless the window location is included in a value of config/noiframeon "]

type

type: string = "() => Promise<void>"

show

show: object

doc

doc: undefined[] = []

type

type: string = "() => void"

src/commandline_frame.ts

src/commandline_frame.ts: object

applyWithTmpTextArea

applyWithTmpTextArea: object

doc

doc: string[] = ["Create a temporary textarea and give it to fn. Remove the textarea afterwards\n\nUseful for document.execCommand"]

type

type: string = "(fn: any) => any"

clear

clear: object

doc

doc: string[] = ["Clears the command line.\nIf you intend to close the command line after this, set evlistener to true in order to enable losing focus.\nOtherwise, no need to pass an argument."]

type

type: string = "(evlistener?: boolean) => void"

enableCompletions

enableCompletions: object

doc

doc: undefined[] = []

type

type: string = "() => void"

fillcmdline

fillcmdline: object

doc

doc: undefined[] = []

type

type: string = "(newcommand?: string, trailspace?: boolean, ffocus?: boolean) => void"

focus

focus: object

doc

doc: undefined[] = []

type

type: string = "() => void"

getClipboard

getClipboard: object

doc

doc: undefined[] = []

type

type: string = "() => any"

getCompletion

getCompletion: object

doc

doc: undefined[] = []

type

type: string = "() => string"

getContent

getContent: object

doc

doc: undefined[] = []

type

type: string = "() => string"

hide_and_clear

hide_and_clear: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<void>"

history

history: object

doc

doc: undefined[] = []

type

type: string = "(n: any) => void"

process

process: object

doc

doc: undefined[] = []

type

type: string = "() => void"

resizeArea

resizeArea: object

doc

doc: undefined[] = []

type

type: string = "() => void"

sendExstr

sendExstr: object

doc

doc: undefined[] = []

type

type: string = "(exstr: any) => Promise<void>"

setClipboard

setClipboard: object

doc

doc: undefined[] = []

type

type: string = "(content: string) => Promise<void>"

setCursor

setCursor: object

doc

doc: undefined[] = []

type

type: string = "(n?: number) => void"

tabcomplete

tabcomplete: object

doc

doc: undefined[] = []

type

type: string = "() => void"

src/completions.ts

src/completions.ts: object

commitIfCurrent

commitIfCurrent: object

doc

doc: string[] = ["If first to modify epoch, commit change. May want to change epoch after commiting. "]

type

type: string = "(epochref: any, asyncFunc: Function, commitFunc: Function, ...args: any[]) => Promise<any>"

updateCompletions

updateCompletions: object

doc

doc: string[] = ["Indicate changes to completions we would like.\n\nThis will probably never be used for original designed purpose."]

type

type: string = "(filter: string, sources: CompletionSource[]) => void"

src/config.ts

src/config.ts: object

get

get: object

doc

doc: string[] = ["Get the value of the key target.\n\nIf the user has not specified a key, use the corresponding key from\ndefaults, if one exists, else undefined."]

type

type: string = "(...target: any[]) => any"

getAsync

getAsync: object

doc

doc: string[] = ["Get the value of the key target, but wait for config to be loaded from the\ndatabase first if it has not been at least once before.\n\nThis is useful if you are a content script and you've just been loaded."]

type

type: string = "(...target: any[]) => Promise<any>"

getDeepProperty

getDeepProperty: object

doc

doc: string[] = ["Given an object and a target, extract the target if it exists, else return undefined"]

type

type: string = "(obj: any, target: any) => any"

init

init: object

doc

doc: string[] = ["Read all user configuration from storage API then notify any waiting asynchronous calls\n\nasynchronous calls generated by getAsync."]

type

type: string = "() => Promise<void>"

o

o: object

doc

doc: undefined[] = []

type

type: string = "(object: any) => any"

save

save: object

doc

doc: string[] = ["Save the config back to storage API.\n\nConfig is not synchronised between different instances of this module until\nsometime after this happens."]

type

type: string = "(storage?: "local" | "sync") => Promise<void>"

schlepp

schlepp: object

doc

doc: undefined[] = []

type

type: string = "(settings: any) => void"

set

set: object

doc

doc: string[] = ["Full target specification, then value\n\ne.g.\n set(\"nmaps\", \"o\", \"open\")\n set(\"search\", \"default\", \"google\")\n set(\"aucmd\", \"BufRead\", \"memrise.com\", \"open memrise.com\")"]

type

type: string = "(...args: any[]) => void"

setDeepProperty

setDeepProperty: object

doc

doc: string[] = ["Create the key path target if it doesn't exist and set the final property to value.\n\nIf the path is an empty array, replace the obj."]

type

type: string = "(obj: any, value: any, target: any) => any"

unset

unset: object

doc

doc: string[] = ["Delete the key at target if it exists "]

type

type: string = "(...target: any[]) => void"

update

update: object

doc

doc: string[] = ["Updates the config to the latest version.\nProposed semantic for config versionning:\n- x.y -> x+1.0 : major architectural changes\n- x.y -> x.y+1 : renaming settings/changing their types\nThere's no need for an updater if you're only adding a new setting/changing\na default setting\n\nWhen adding updaters, don't forget to set(\"configversion\", newversionnumber)!"]

type

type: string = "() => Promise<void>"

src/config_rc.ts

src/config_rc.ts: object

rcFileToExCmds

rcFileToExCmds: object

doc

doc: undefined[] = []

type

type: string = "(rcText: string) => string[]"

runRc

runRc: object

doc

doc: undefined[] = []

type

type: string = "(rc: string) => Promise<void>"

source

source: object

doc

doc: undefined[] = []

type

type: string = "(filename?: string) => Promise<boolean>"

src/controller.ts

src/controller.ts: object

ParserController

ParserController: object

doc

doc: string[] = ["Accepts keyevents, resolves them to maps, maps to exstrs, executes exstrs "]

type

type: string = "() => IterableIterator<any>"

acceptExCmd

acceptExCmd: object

doc

doc: string[] = ["Parse and execute ExCmds "]

type

type: string = "(exstr: string) => Promise<any>"

acceptKey

acceptKey: object

doc

doc: string[] = ["Feed keys to the ParserController "]

type

type: string = "(keyevent: MsgSafeKeyboardEvent) => void"

src/convert.ts

src/convert.ts: object

toBoolean

toBoolean: object

doc

doc: undefined[] = []

type

type: string = "(s: string) => boolean"

toNumber

toNumber: object

doc

doc: undefined[] = []

type

type: string = "(s: string) => number"

src/css_util.ts

src/css_util.ts: object

changeCss

changeCss: object

doc

doc: string[] = ["Apply rule to stylesheet. rulename, optionname identify a rule. They may be meta rules "]

type

type: string = "(rulename: string, optionname: string, sheet: Stylesheet) => Stylesheet"

changeSingleCss

changeSingleCss: object

doc

doc: string[] = ["Add desired non-meta rule to stylesheet replacing existing rule with the same selector if present "]

type

type: string = "(rulename: string, optionname: string, sheet: Stylesheet) => Stylesheet"

findCssRules

findCssRules: object

doc

doc: string[] = ["Find rules in sheet that match selector "]

type

type: string = "(selector: string, sheet: Stylesheet) => number[]"

src/dom.ts

src/dom.ts: object

anchors

anchors: object

doc

doc: string[] = ["Get array of \"anchors\": elements which have id or name and can be addressed\nwith the hash/fragment in the URL"]

type

type: string = "() => any"

compareElementArea

compareElementArea: object

doc

doc: string[] = ["Comparison function by offsetWidth/Height, used for sorting elements by their\narea on the page"]

type

type: string = "(a: HTMLElement, b: HTMLElement) => number"

elementsByXPath

elementsByXPath: object

doc

doc: string[] = ["Iterable of elements that match xpath.\n\nAdapted from stackoverflow"]

type

type: string = "(xpath: any, parent?: any) => IterableIterator<Node>"

elementsWithText

elementsWithText: object

doc

doc: undefined[] = []

type

type: string = "() => any"

focus

focus: object

doc

doc: string[] = ["Focuses an input element and makes sure the cursor is put at the end of the input "]

type

type: string = "(e: HTMLElement) => void"

getAllDocumentFrames

getAllDocumentFrames: object

doc

doc: string[] = ["Return all frames that belong to the document (frames that belong to\nextensions are ignored)."]

type

type: string = "(doc?: Document) => HTMLIFrameElement[]"

getElemsBySelector

getElemsBySelector: object

doc

doc: string[] = ["Get all elements that match the given selector"]

type

type: string = "(selector: string, filters: ElementFilter[]) => any"

getLastUsedInput

getLastUsedInput: object

doc

doc: undefined[] = []

type

type: string = "() => HTMLElement"

getNthElement

getNthElement: object

doc

doc: string[] = ["Get the nth input element on a page"]

type

type: string = "(selectors: string, nth: number, filters: ElementFilter[]) => HTMLElement"

getSelector

getSelector: object

doc

doc: string[] = ["Computes the unique CSS selector of a specific HTMLElement "]

type

type: string = "(e: HTMLElement) => any"

heightMatters

heightMatters: object

doc

doc: string[] = ["This function decides whether the height attribute contained in a\nComputedStyle matters. For example, the height attribute doesn't matter for\nelements that have \"display: inline\" because their height is overriden by\nthe height of the node they are in. "]

type

type: string = "(style: CSSStyleDeclaration) => boolean"

hijackPageFocusFunction

hijackPageFocusFunction: object

doc

doc: string[] = ["Replaces the page's HTMLElement.prototype.focus with our own, onPageFocus "]

type

type: string = "() => void"

hijackPageListenerFunctions

hijackPageListenerFunctions: object

doc

doc: string[] = ["Replace the page's addEventListener with a closure containing a reference\nto the original addEventListener and [[registerEvListenerAction]]. Do the\nsame with removeEventListener."]

type

type: string = "() => void"

isEditableHTMLInput

isEditableHTMLInput: object

doc

doc: string[] = ["Returns whether the passed HTML input element is editable"]

type

type: string = "(element: MsgSafeNode) => boolean"

isSubstantial

isSubstantial: object

doc

doc: string[] = ["Is the element of \"substantial\" size and shown on the page. The element\ndoesn't need to be in the viewport. This is useful when you want to\nscroll to something, but still want to exclude tiny and useless items"]

type

type: string = "(element: Element) => boolean"

isTextEditable

isTextEditable: object

doc

doc: string[] = ["Given a DOM element, returns true if you can edit it with key presses or\nif the element is of a type that should handle its own keypresses\n(e.g. role=application for google docs/sheets)\nTODO: work on case sensitivity\nconsider all the possible cases"]

type

type: string = "(element: MsgSafeNode) => boolean"

isVisible

isVisible: object

doc

doc: string[] = ["is the element within a rect and not obscured by another element?\n\nFrom: https://github.com/lusakasa/saka-key/blob/9f560b3a718a9efda809dcb794de14b4e675b35a/src/modes/hints/client/findHints.js#L97\nBased on https://github.com/guyht/vimari/blob/master/vimari.safariextension/linkHints.js"]

type

type: string = "(element: Element) => boolean"

mouseEvent

mouseEvent: object

doc

doc: string[] = ["Dispatch a mouse event to the target element\nbased on cVim's implementation"]

type

type: string = "(element: Element, type: "hover" | "unhover" | "click", modifierKeys?: {}) => void"

onPageFocus

onPageFocus: object

doc

doc: string[] = ["WARNING: This function can potentially recieve malicious input! For the\nwhole discussion about this, see\nhttps://github.com/cmcaine/tridactyl/pull/225\n\nRemember to check whether WebComponents change anything security-wise:\nhttps://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1406825"]

type

type: string = "(elem: HTMLElement, args: any[]) => boolean"

registerEvListenerAction

registerEvListenerAction: object

doc

doc: string[] = ["Adds or removes an element from the hintworthy_js_elems array of the\ncurrent tab."]

type

type: string = "(elem: EventTarget, add: boolean, event: string) => void"

setInput

setInput: object

doc

doc: undefined[] = []

type

type: string = "(el: any) => Promise<void>"

setupFocusHandler

setupFocusHandler: object

doc

doc: undefined[] = []

type

type: string = "() => void"

simulateClick

simulateClick: object

doc

doc: string[] = ["if `target === _blank` clicking the link is treated as opening a popup and is blocked. Use webext API to avoid that. "]

type

type: string = "(target: HTMLElement) => void"

widthMatters

widthMatters: object

doc

doc: undefined[] = []

type

type: string = "(style: CSSStyleDeclaration) => boolean"

src/download_background.ts

src/download_background.ts: object

downloadUrl

downloadUrl: object

doc

doc: string[] = ["Download a given URL to disk\n\nNormal URLs are downloaded normally. Data URLs are handled more carefully\nas it's not allowed in WebExt land to just call downloads.download() on\nthem"]

type

type: string = "(url: string, saveAs: boolean) => Promise<void>"

objectUrlFromDataUrl

objectUrlFromDataUrl: object

doc

doc: string[] = ["Construct an object URL string from a given data URL\n\nThis is needed because feeding a data URL directly to downloads.download()\ncauses \"Error: Access denied for URL\""]

type

type: string = "(dataUrl: URL) => string"

src/excmds.ts

src/excmds.ts: object

addJump

addJump: object

doc

doc: string[] = ["Called on 'scroll' events.\nIf you want to have a function that moves within the page but doesn't add a\nlocation to the jumplist, make sure to set JUMPED to true before moving\naround.\nThe setTimeout call is required because sometimes a user wants to move\nsomewhere by pressing 'j' multiple times and we don't want to add the\nin-between locations to the jump list"]

type

type: string = "(scrollEvent: UIEvent) => void"

autocmd

autocmd: object

doc

doc: string[] = ["Set autocmds to run when certain events happen."]

type

type: string = "(event: string, url: string, ...excmd: string[]) => void"

autocmddelete

autocmddelete: object

doc

doc: string[] = ["Remove autocmds"]

type

type: string = "(event: string, url: string) => void"

autocontain

autocontain: object

doc

doc: string[] = ["Automatically open a domain and all its subdomains in a specified container.\n\nFor declaring containers that do not yet exist, consider using `auconscreatecontainer true` in your tridactylrc.\nThis allows tridactyl to automatically create containers from your autocontain directives. Note that they will be random icons and colors.\n\n** NB: This is an experimental feature, if you encounter issues please create an issue on github. **\n\nThe domain is passed through as a regular expression so there are a few gotchas to be aware of:\n* Unescaped periods will match *anything*. `autocontain google.co.uk work` will match `google!co$uk`. Escape your periods or accept that you might get some false positives.\n* You can use regex in your domain pattern. `autocontain google\\,(co\\.uk|com) work` will match either `google.co.uk` or `google.com`."]

type

type: string = "(domain: string, container: string) => void"

back

back: object

doc

doc: string[] = ["Navigate back one page in history. "]

type

type: string = "(n?: number) => void"

bind

bind: object

doc

doc: string[] = ["Bind a sequence of keys to an excmd or view bound sequence.\n\nThis is an easier-to-implement bodge while we work on vim-style maps.\n\nExamples:\n\n - `bind G fillcmdline tabopen google`\n - `bind D composite tabclose | buffer #`\n - `bind j scrollline 20`\n - `bind F hint -b`\n\nYou can view binds by omitting the command line:\n\n - `bind j`\n - `bind k`\n\nYou can bind to modifiers and special keys by enclosing them with angle brackets, for example `bind <C-\\>z fullscreen`, `unbind <F1>` (a favourite of people who use TreeStyleTabs :) ), or `bind <Backspace> forward`.\n\nModifiers are truncated to a single character, so Ctrl -> C, Alt -> A, and Shift -> S. Shift is a bit special as it is only required if Shift does not change the key inputted, e.g. `<S-ArrowDown>` is OK, but `<S-a>` should just be `A`.\n\nYou can view all special key names here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\n\nUse [[composite]] if you want to execute multiple excmds. Use\n[[fillcmdline]] to put a string in the cmdline and focus the cmdline\n(otherwise the string is executed immediately).\n\n\nYou can bind to other modes with `bind --mode={insert|ignore|normal|input} ...`, e.g, `bind --mode=insert emacs qall` (NB: unlike vim, all preceeding characters will not be input).\n\nSee also:\n\n - [[unbind]]\n - [[reset]]"]

type

type: string = "(...args: string[]) => void"

blacklistadd

blacklistadd: object

doc

doc: string[] = ["Helper function to put Tridactyl into ignore mode on the provided URL.\n\nSimply creates a DocStart and TabEnter [[autocmd]] that runs `mode ignore`.\n\nDue to a Tridactyl bug, the only way to remove these rules once they are set is to delete all of your autocmds with `unset autocmds`.\n\n<!-- this should probably be moved to an ex alias once configuration has better help --!>"]

type

type: string = "(url: string) => void"

bmark

bmark: object

doc

doc: string[] = ["Add or remove a bookmark.\n\nOptionally, you may give the bookmark a title. If no URL is given, a bookmark is added for the current page.\n\nIf a bookmark already exists for the URL, it is removed, even if a title is given.\n\nDoes not support creation of folders: you'll need to use the Firefox menus for that."]

type

type: string = "(url?: string, ...titlearr: string[]) => Promise<void>"

buffer

buffer: object

doc

doc: string[] = ["Change active tab."]

type

type: string = "(index: number | "#") => Promise<void>"

bufferall

bufferall: object

doc

doc: string[] = ["Change active tab."]

type

type: string = "(id: string) => Promise<any>"

changelistjump

changelistjump: object

doc

doc: string[] = ["Focus the tab which contains the last focussed input element. If you're lucky, it will focus the right input, too.\n\nCurrently just goes to the last focussed input; being able to jump forwards and backwards is planned."]

type

type: string = "(n?: number) => Promise<void>"

clipboard

clipboard: object

doc

doc: string[] = ["Use the system clipboard.\n\nIf `excmd == \"open\"`, call [[open]] with the contents of the clipboard. Similarly for [[tabopen]].\n\nIf `excmd == \"yank\"`, copy the current URL, or if given, the value of toYank, into the system clipboard.\n\nIf `excmd == \"yankcanon\"`, copy the canonical URL of the current page if it exists, otherwise copy the current URL.\n\nIf `excmd == \"yankshort\"`, copy the shortlink version of the current URL, and fall back to the canonical then actual URL. Known to work on https://yankshort.neocities.org/.\n\nIf `excmd == \"yanktitle\"`, copy the title of the open page.\n\nIf `excmd == \"yankmd\"`, copy the title and url of the open page formatted in Markdown for easy use on sites such as reddit.\n\nIf you're on Linux and the native messenger is installed, Tridactyl will call an external binary (either xclip or xsel) to read or write to your X selection buffer. If you want another program to be used, set \"externalclipboardcmd\" to its name and make sure it has the same interface as xsel/xclip (\"-i\"/\"-o\" and reading from stdin).\n\nWhen doing a read operation (i.e. open or tabopen), if \"putfrom\" is set to \"selection\", the X selection buffer will be read instead of the clipboard. Set \"putfrom\" to \"clipboard\" to use the clipboard.\n\nWhen doing a write operation, if \"yankto\" is set to \"selection\", only the X selection buffer will be written to. If \"yankto\" is set to \"both\", both the X selection and the clipboard will be written to. If \"yankto\" is set to \"clipboard\", only the clipboard will be written to."]

type

type: string = "(excmd?: "open" | "yank" | "yankshort" | "yankcanon" | "yanktitle" | "yankmd" | "tabopen", ...toY..."

comclear

comclear: object

doc

doc: string[] = ["Similar to vim's `comclear` command. Clears an excmd alias defined by\n`command`.\n\nFor example: `comclear helloworld` will reverse any changes caused\nby `command helloworld xxx`\n\nSee also:\n - [[command]]"]

type

type: string = "(name: string) => void"

command

command: object

doc

doc: string[] = ["Similar to vim's `:command`. Maps one ex-mode command to another.\nIf command already exists, this will override it, and any new commands\nadded in a future release will be SILENTLY overridden. Aliases are\nexpanded recursively.\n\nExamples:\n - `command t tabopen`\n - `command tn tabnext_gt`\n = `command hello t` This will expand recursively into 'hello'->'tabopen'\n\nNote that this is only for excmd->excmd mappings. To map a normal-mode\ncommand to an excommand, see [[bind]].\n\nSee also:\n - [[comclear]]"]

type

type: string = "(name: string, ...definition: string[]) => void"

composite

composite: object

doc

doc: string[] = ["Split `cmds` on pipes (|) and treat each as its own command. Return values are passed as the last argument of the next ex command, e.g,\n\n`composite echo yes | fillcmdline` becomes `fillcmdline yes`. A more complicated example is the ex alias, `command current_url composite get_current_url | fillcmdline_notrail `, which is used in, e.g. `bind T current_url tabopen`.\n\nWorkaround: this should clearly be in the parser, but we haven't come up with a good way to deal with |s in URLs, search terms, etc. yet.\n\n`cmds` are also split with semicolons (;) and don't pass things along to each other.\n\nThe behaviour of combining ; and | in the same composite command is left as an exercise for the reader."]

type

type: string = "(...cmds: string[]) => Promise<any>"

containerclose

containerclose: object

doc

doc: string[] = ["Closes all tabs open in the same container across all windows."]

type

type: string = "(name: string) => Promise<void>"

containercreate

containercreate: object

doc

doc: string[] = ["Creates a new container. Note that container names must be unique and that the checks are case-insensitive.\n\nFurther reading https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextualIdentities/ContextualIdentity\n\nExample usage:\n - `:containercreate tridactyl green dollar`"]

type

type: string = "(name: string, color?: string, icon?: string) => Promise<void>"

containerdelete

containerdelete: object

doc

doc: string[] = ["Delete a container. Closes all tabs associated with that container beforehand. Note: container names are case-insensitive."]

type

type: string = "(name: string) => Promise<void>"

containerupdate

containerupdate: object

doc

doc: string[] = ["Update a container's information. Note that none of the parameters are optional and that container names are case-insensitive.\n\nExample usage:\n\n- Changing the container name: `:containerupdate banking blockchain green dollar`\n\n- Changing the container icon: `:containerupdate banking banking green briefcase`\n\n- Changing the container color: `:containerupdate banking banking purple dollar`"]

type

type: string = "(name: string, uname: string, ucolor: string, uicon: string) => Promise<void>"

credits

credits: object

doc

doc: string[] = ["Display Tridactyl's contributors in order of commits in a user-friendly fashion"]

type

type: string = "(excmd?: string) => Promise<void>"

cssparse

cssparse: object

doc

doc: undefined[] = []

type

type: string = "(...css: string[]) => void"

curJumps

curJumps: object

doc

doc: string[] = ["Returns a promise for an object containing the jumplist of all pages accessed in the current tab.\nThe keys of the object currently are the page's URL, however this might change some day. Use [[getJumpPageId]] to access the jumplist of a specific page."]

type

type: string = "() => Promise<any>"

echo

echo: object

doc

doc: undefined[] = []

type

type: string = "(...str: string[]) => Promise<string>"

editor

editor: object

doc

doc: string[] = ["Opens your favourite editor (which is currently gVim) and fills the last used input with whatever you write into that file.\n**Requires that the native messenger is installed, see [[native]] and [[installnative]]**.\n\nUses the `editorcmd` config option, default = `auto` looks through a list defined in native_background.ts try find a sensible combination. If it's a bit slow, or chooses the wrong editor, or gives up completely, set editorcmd to something you want. The command must stay in the foreground until the editor exits.\n\nThe editorcmd needs to accept a filename, stay in the foreground while it's edited, save the file and exit.\n\nYou're probably better off using the default insert mode bind of `<C-i>` (Ctrl-i) to access this."]

type

type: string = "() => Promise<void>"

exclaim

exclaim: object

doc

doc: string[] = ["Run command in /bin/sh (unless you're on Windows), and print the output in the command line. Non-zero exit codes and stderr are ignored, currently.\n\nRequires the native messenger, obviously.\n\nIf you want to use a different shell, just prepend your command with whatever the invocation is and keep in mode that most shells require quotes around the command to be executed, e.g. `:exclaim xonsh -c \"1+2\"`.\n\nAliased to `!` but the exclamation mark **must be followed with a space**."]

type

type: string = "(...str: string[]) => Promise<void>"

exclaim_quiet

exclaim_quiet: object

doc

doc: string[] = ["Like exclaim, but without any output to the command line."]

type

type: string = "(...str: string[]) => Promise<string>"

fillcmdline

fillcmdline: object

doc

doc: string[] = ["Set the current value of the commandline to string *with* a trailing space "]

type

type: string = "(...strarr: string[]) => void"

fillcmdline_nofocus

fillcmdline_nofocus: object

doc

doc: string[] = ["Show and fill the command line without focusing it "]

type

type: string = "(...strarr: string[]) => Promise<any>"

fillcmdline_notrail

fillcmdline_notrail: object

doc

doc: string[] = ["Set the current value of the commandline to string *without* a trailing space "]

type

type: string = "(...strarr: string[]) => void"

fillcmdline_tmp

fillcmdline_tmp: object

doc

doc: string[] = ["Shows str in the command line for ms milliseconds. Recommended duration: 3000ms. "]

type

type: string = "(ms: number, ...strarr: string[]) => Promise<any>"

fillinput

fillinput: object

doc

doc: string[] = ["Fills the element matched by `selector` with content and falls back to the last used input if the element can't be found. You probably don't want this; it's used internally for [[editor]].\n\nThat said, `bind gs fillinput null [Tridactyl](https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/) is my favourite add-on` could probably come in handy."]

type

type: string = "(selector: string, ...content: string[]) => Promise<void>"

find

find: object

doc

doc: string[] = ["Start find mode. Work in progress."]

type

type: string = "(direction?: number) => void"

findRelLink

findRelLink: object

doc

doc: undefined[] = []

type

type: string = "(pattern: RegExp) => HTMLAnchorElement"

findnext

findnext: object

doc

doc: string[] = ["Highlight the next occurence of the previously searched for word."]

type

type: string = "(n: number) => void"

fixamo

fixamo: object

doc

doc: string[] = ["Simply sets\n```js\n \"privacy.resistFingerprinting.block_mozAddonManager\":true\n \"extensions.webextensions.restrictedDomains\":\"\"\n```\nin about:config via user.js so that Tridactyl (and other extensions!) can be used on addons.mozilla.org and other sites.\n\nRequires `native` and a `restart`."]

type

type: string = "() => Promise<void>"

fixamo_quiet

fixamo_quiet: object

doc

doc: string[] = ["Like [[fixamo]] but quieter."]

type

type: string = "() => Promise<void>"

focusbyid

focusbyid: object

doc

doc: undefined[] = []

type

type: string = "(id: string) => void"

focusinput

focusinput: object

doc

doc: string[] = ["Focus the last used input on the page"]

type

type: string = "(nth: string | number) => void"

followpage

followpage: object

doc

doc: string[] = ["Find a likely next/previous link and follow it\n\nIf a link or anchor element with rel=rel exists, use that, otherwise fall back to:\n\n 1) find the last anchor on the page with innerText matching the appropriate `followpagepattern`.\n 2) call [[urlincrement]] with 1 or -1\n\nIf you want to support e.g. French:\n\n```\nset followpagepatterns.next ^(next|newer|prochain)\\b|»|>>\nset followpagepatterns.prev ^(prev(ious)?|older|précédent)\\b|»|>>\n```"]

type

type: string = "(rel?: "next" | "prev") => void"

forceURI

forceURI: object

doc

doc: string[] = ["Take a string and find a way to interpret it as a URI or search query. "]

type

type: string = "(maybeURI: string) => string"

forward

forward: object

doc

doc: string[] = ["Navigate forward one page in history. "]

type

type: string = "(n?: number) => void"

fullscreen

fullscreen: object

doc

doc: string[] = ["Toggle fullscreen state"]

type

type: string = "() => Promise<void>"

get

get: object

doc

doc: string[] = ["Puts the contents of config value with keys `keys` into the commandline and the background page console\n\nIt's a bit rubbish, but we don't have a good way to provide feedback to the commandline yet.\n\nYou can view the log entry in the browser console (Ctrl-Shift-j).\n\nFor example, you might try `get nmaps` to see all of your current binds."]

type

type: string = "(...keys: string[]) => void"

getInputSelector

getInputSelector: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any>"

getJumpPageId

getJumpPageId: object

doc

doc: string[] = ["This is used as an ID for the current page in the jumplist.\nIt has a potentially confusing behavior: if you visit site A, then site B, then visit site A again, the jumplist that was created for your first visit on A will be re-used for your second visit.\nAn ideal solution would be to have a counter that is incremented every time a new page is visited within the tab and use that as the return value for getJumpPageId but this doesn't seem to be trivial to implement."]

type

type: string = "() => string"

getNativeVersion

getNativeVersion: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<void>"

getSortedWinTabs

getSortedWinTabs: object

doc

doc: string[] = ["Get list of tabs sorted by most recent use"]

type

type: string = "() => Promise<any[]>"

get_current_url

get_current_url: object

doc

doc: string[] = ["Returns the current URL. For use with [[composite]]."]

type

type: string = "() => Promise<any>"

getclip

getclip: object

doc

doc: string[] = ["Fetches the content of the clipboard/selection buffer depending on user's preferences"]

type

type: string = "() => Promise<any>"

getinput

getinput: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<string>"

getnexttabs

getnexttabs: object

doc

doc: undefined[] = []

type

type: string = "(tabid: number, n?: number) => Promise<any[]>"

geturlsforlinks

geturlsforlinks: object

doc

doc: string[] = ["Returns the url of links that have a matching rel.\n\nDon't bind to this: it's an internal function."]

type

type: string = "(reltype: string, rel: string) => any"

gobble

gobble: object

doc

doc: string[] = ["Initialize gobble mode.\n\nIt will read `nChars` input keys, append them to `endCmd` and execute that\nstring."]

type

type: string = "(nChars: number, endCmd: string) => Promise<void>"

guiset

guiset: object

doc

doc: string[] = ["Change which parts of the Firefox user interface are shown. **NB: This feature is experimental and might break stuff.**\n\nMight mangle your userChrome. Requires native messenger, and you must restart Firefox each time to see any changes (this can be done using [[restart]]). <!-- (unless you enable addon debugging and refresh using the browser toolbox) -->\n\nView available rules and options [here](/static/docs/modules/_src_css_util_.html#potentialrules) and [here](/static/docs/modules/_src_css_util_.html#metarules).\n\nExample usage: `guiset gui none`, `guiset gui full`, `guiset tabs autohide`.\n\nSome of the available options:\n\n- gui\n - full\n - none\n\n- tabs\n - always\n - autohide\n\n- navbar\n - always\n - autohide\n - none\n\n- hoverlink (the little link that appears when you hover over a link)\n - none\n - left\n - right\n - top-left\n - top-right\n\n- titlebar\n - hide\n - show\n\nIf you want to use guiset in your tridactylrc, you might want to use [[guiset_quiet]] instead."]

type

type: string = "(rule: string, option: string) => Promise<void>"

guiset_quiet

guiset_quiet: object

doc

doc: string[] = ["Like [[guiset]] but quieter."]

type

type: string = "(rule: string, option: string) => Promise<MessageResp>"

hasScheme

hasScheme: object

doc

doc: undefined[] = []

type

type: string = "(uri: string) => RegExpMatchArray"

help

help: object

doc

doc: string[] = ["Show this page.\n\n`:help something` jumps to the entry for something. Something can be an excmd, an alias for an excmd or a binding.\n\nThe \"nmaps\" list is a list of all the bindings for the command you're seeing and the \"exaliases\" list lists all its aliases.\n\nIf there's a conflict (e.g. you have a \"go\" binding that does something and also a \"go\" excmd that does something else), the binding has higher priority.\n\nIf the keyword you gave to `:help` is actually an alias for a composite command (see [[composite]]) , you will be taken to the help section for the first command of the pipeline. You will be able to see the whole pipeline by hovering your mouse over the alias in the \"exaliases\" list. Unfortunately there currently is now way to display these HTML tooltips from the keyboard.\n\ne.g. `:help bind`"]

type

type: string = "(excmd?: string) => Promise<void>"

hidecmdline

hidecmdline: object

doc

doc: undefined[] = []

type

type: string = "() => void"

hint

hint: object

doc

doc: string[] = ["Hint a page."]

type

type: string = "(option?: string, selectors?: string, ...rest: string[]) => Promise<any>"

history

history: object

doc

doc: undefined[] = []

type

type: string = "(n: number) => void"

home

home: object

doc

doc: string[] = ["Go to the homepages you have set with `set home [url1] [url2]`.\n\n "]

type

type: string = "(all?: "false" | "true") => void"

idFromIndex

idFromIndex: object

doc

doc: string[] = ["Resolve a tab index to the tab id of the corresponding tab in this window."]

type

type: string = "(index?: string | number) => Promise<number>"

installnative

installnative: object

doc

doc: string[] = ["Simply copies \"curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash\" to the clipboard and tells the user to run it."]

type

type: string = "() => Promise<void>"

js

js: object

doc

doc: string[] = ["Lets you execute JavaScript in the page context. If you want to get the result back, use `composite js ... | fillcmdline`\n\nSome of Tridactyl's functions are accessible here via the `tri` object. Just do `console.log(tri)` in the web console on the new tab page to see what's available.\n\nIf you want to pipe an argument to `js`, you need to use the \"-p\" flag and then use the JS_ARG global variable, e.g:\n\n`composite get_current_url | js -p alert(JS_ARG)`"]

type

type: string = "(...str: string[]) => Promise<any>"

jsb

jsb: object

doc

doc: string[] = ["Lets you execute JavaScript in the background context. All the help from [[js]] applies. Gives you a different `tri` object."]

type

type: string = "(...str: string[]) => Promise<any>"

jumpnext

jumpnext: object

doc

doc: string[] = ["Calls [[jumpprev]](-n) "]

type

type: string = "(n?: number) => void"

jumpprev

jumpprev: object

doc

doc: string[] = ["Similar to Pentadactyl or vim's jump list."]

type

type: string = "(n?: number) => void"

loadaucmds

loadaucmds: object

doc

doc: undefined[] = []

type

type: string = "(cmdType: "DocStart" | "DocLoad" | "DocEnd" | "TabEnter" | "TabLeft") => Promise<void>"

loggingsetlevel

loggingsetlevel: object

doc

doc: string[] = ["Set the logging level for a given logging module."]

type

type: string = "(logModule: string, level: string) => void"

mode

mode: object

doc

doc: string[] = ["Example:\n - `mode ignore` to ignore all keys."]

type

type: string = "(mode: ModeName) => void"

mute

mute: object

doc

doc: string[] = ["Mute current tab or all tabs.\n\nPassing \"all\" to the excmd will operate on the mute state of all tabs.\nPassing \"unmute\" to the excmd will unmute.\nPassing \"toggle\" to the excmd will toggle the state of `browser.tabs.tab.MutedInfo`"]

type

type: string = "(...muteArgs: string[]) => Promise<void>"

native

native: object

doc

doc: string[] = ["Tells you if the native messenger is installed and its version."]

type

type: string = "() => Promise<void>"

nativeopen

nativeopen: object

doc

doc: string[] = ["Uses the native messenger to open URLs.\n\n**Be *seriously* careful with this: you can use it to open any URL you can open in the Firefox address bar.**\n\nYou've been warned."]

type

type: string = "(url: string, ...firefoxArgs: string[]) => Promise<void>"

open

open: object

doc

doc: string[] = ["Open a new page in the current tab."]

type

type: string = "(...urlarr: string[]) => Promise<void>"

open_quiet

open_quiet: object

doc

doc: string[] = ["Like [[open]] but doesn't make a new entry in history."]

type

type: string = "(...urlarr: string[]) => Promise<void>"

parse_bind_args

parse_bind_args: object

doc

doc: undefined[] = []

type

type: string = "(...args: string[]) => bind_args"

pin

pin: object

doc

doc: string[] = ["Pin the current tab "]

type

type: string = "() => Promise<void>"

qall

qall: object

doc

doc: string[] = ["Close all windows "]

type

type: string = "() => Promise<void>"

quickmark

quickmark: object

doc

doc: string[] = ["Bind a quickmark for the current URL or space-separated list of URLs to a key on the keyboard.\n\nAfterwards use go[key], gn[key], or gw[key] to [[open]], [[tabopen]], or\n[[winopen]] the URL respectively."]

type

type: string = "(key: string, ...addressarr: string[]) => Promise<void>"

reader

reader: object

doc

doc: string[] = ["Opens the current page in Firefox's reader mode.\nYou currently cannot use Tridactyl while in reader mode."]

type

type: string = "() => Promise<void>"

reload

reload: object

doc

doc: string[] = ["Reload the next n tabs, starting with activeTab, possibly bypassingCache "]

type

type: string = "(n?: number, hard?: boolean) => Promise<void>"

reloadall

reloadall: object

doc

doc: string[] = ["Reloads all tabs, bypassing the cache if hard is set to true "]

type

type: string = "(hard?: boolean) => Promise<void>"

reloadhard

reloadhard: object

doc

doc: string[] = ["Reload the next n tabs, starting with activeTab. bypass cache for all "]

type

type: string = "(n?: number) => Promise<void>"

removeSource

removeSource: object

doc

doc: undefined[] = []

type

type: string = "() => void"

repeat

repeat: object

doc

doc: string[] = ["Repeats a `cmd` `n` times.\nFalls back to the last executed command if `cmd` doesn't exist.\nExecutes the command once if `n` isn't defined either."]

type

type: string = "(n?: number, ...exstr: string[]) => void"

reset

reset: object

doc

doc: string[] = ["Restores a sequence of keys to their default value.\n\nSee also:\n\n - [[bind]]\n - [[unbind]]"]

type

type: string = "(key: string) => Promise<void>"

restart

restart: object

doc

doc: string[] = ["Restarts firefox with the same commandline arguments.\n\nWarning: This can kill your tabs, especially if you :restart several times\nin a row"]

type

type: string = "() => Promise<void>"

run_exstr

run_exstr: object

doc

doc: string[] = ["Hacky ex string parser.\n\nUse it for fire-and-forget running of background commands in content."]

type

type: string = "(...commands: string[]) => void"

sanitise

sanitise: object

doc

doc: string[] = ["Deletes various privacy-related items.\n\nThe list of possible arguments can be found here:\nhttps://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData/DataTypeSet\n\nAdditional, tridactyl-specific arguments are:\n- commandline: Removes the in-memory commandline history.\n- tridactyllocal: Removes all tridactyl storage local to this machine. Use it with\n commandline if you want to delete your commandline history.\n- tridactylsync: Removes all tridactyl storage associated with your Firefox Account (i.e, all user configuration, by default).\nThese arguments aren't affected by the timespan parameter.\n\nTimespan parameter:\n-t [0-9]+(m|h|d|w)\n\nExamples:\n\n- `sanitise all` -> Deletes everything\n- `sanitise history` -> Deletes all history\n- `sanitise commandline tridactyllocal tridactylsync` -> Deletes every bit of data Tridactyl holds\n- `sanitise cookies -t 3d` -> Deletes cookies that were set during the last three days."]

type

type: string = "(...args: string[]) => Promise<void>"

saveJumps

saveJumps: object

doc

doc: undefined[] = []

type

type: string = "(jumps: any) => Promise<void>"

scrollline

scrollline: object

doc

doc: string[] = ["Scrolls the document of its first scrollable child element by n lines.\n\nThe height of a line is defined by the site's CSS. If Tridactyl can't get it, it'll default to 22 pixels."]

type

type: string = "(n?: number) => void"

scrollpage

scrollpage: object

doc

doc: string[] = ["Scrolls the document by n pages.\n\nThe height of a page is the current height of the window."]

type

type: string = "(n?: number) => void"

scrollpx

scrollpx: object

doc

doc: string[] = ["Scrolls the window or any scrollable child element by a pixels on the horizontal axis and b pixels on the vertical axis."]

type

type: string = "(a: number, b: number) => Promise<void>"

scrollto

scrollto: object

doc

doc: string[] = ["If two numbers are given, treat as x and y values to give to window.scrollTo\nIf one number is given, scroll to that percentage along a chosen axis, defaulting to the y-axis\n\nNote that if `a` is 0 or 100 and if the document is not scrollable in the given direction, Tridactyl will attempt to scroll the first scrollable element until it reaches the very bottom of that element."]

type

type: string = "(a: number, b?: number | "x" | "y") => void"

searchURL

searchURL: object

doc

doc: undefined[] = []

type

type: string = "(provider: string, query: string) => URL"

searchsetkeyword

searchsetkeyword: object

doc

doc: string[] = ["Set a search engine keyword for use with *open or `set searchengine`"]

type

type: string = "(keyword: string, url: string) => void"

selectLast

selectLast: object

doc

doc: undefined[] = []

type

type: string = "(selector: string) => HTMLElement"

set

set: object

doc

doc: string[] = ["Set a key value pair in config.\n\nUse to set any string values found [here](/static/docs/modules/_src_config_.html#defaults)\n\ne.g.\n set searchurls.google https://www.google.com/search?q=\n set logging.messaging info\n\nIf no value is given, the value of the of the key will be displayed"]

type

type: string = "(key: string, ...values: string[]) => void"

setclip

setclip: object

doc

doc: string[] = ["Copies a string to the clipboard/selection buffer depending on the user's preferences"]

type

type: string = "(str: any) => Promise<any>"

showcmdline

showcmdline: object

doc

doc: undefined[] = []

type

type: string = "(focus?: boolean) => void"

sleep

sleep: object

doc

doc: string[] = ["Sleep time_ms milliseconds.\nThis is probably only useful for composite commands that need to wait until the previous asynchronous command has finished running."]

type

type: string = "(time_ms: number) => Promise<void>"

source

source: object

doc

doc: string[] = ["Runs an RC file from disk.\n\nIf no argument given, it will try to open ~/.tridactylrc, ~/.config/tridactylrc or $XDG_CONFIG_HOME/tridactyl/tridactylrc in reverse order. You may use a `_` in place of a leading `.` if you wish, e.g, if you use Windows.\n\nOn Windows, the `~` expands to `%USERPROFILE%`.\n\nThe RC file is just a bunch of Tridactyl excmds (i.e, the stuff on this help page). Settings persist in local storage; add `sanitise tridactyllocal tridactylsync` to make it more Vim like. There's an [example file](https://raw.githubusercontent.com/cmcaine/tridactyl/master/.tridactylrc) if you want it."]

type

type: string = "(...fileArr: string[]) => Promise<void>"

source_quiet

source_quiet: object

doc

doc: string[] = ["Same as [[source]] but suppresses all errors"]

type

type: string = "(...fileArr: string[]) => Promise<void>"

suppress

suppress: object

doc

doc: string[] = ["Deprecated"]

type

type: string = "(preventDefault?: boolean, stopPropagation?: boolean) => void"

tabIndexSetActive

tabIndexSetActive: object

doc

doc: string[] = ["Switch to the tab by index (position on tab bar), wrapping round."]

type

type: string = "(index: string | number) => Promise<any>"

tabSetActive

tabSetActive: object

doc

doc: undefined[] = []

type

type: string = "(id: number) => any"

tabclose

tabclose: object

doc

doc: string[] = ["Close a tab.\n\nKnown bug: autocompletion will make it impossible to close more than one tab at once if the list of numbers looks enough like an open tab's title or URL."]

type

type: string = "(...indexes: string[]) => Promise<void>"

tabclosealltoleft

tabclosealltoleft: object

doc

doc: string[] = ["Close all tabs to the left of the current one"]

type

type: string = "() => Promise<void>"

tabclosealltoright

tabclosealltoright: object

doc

doc: string[] = ["Close all tabs to the right of the current one"]

type

type: string = "() => Promise<void>"

tabdetach

tabdetach: object

doc

doc: string[] = ["Detach a tab, opening it in a new window."]

type

type: string = "(index?: number) => Promise<void>"

tabduplicate

tabduplicate: object

doc

doc: string[] = ["Duplicate a tab."]

type

type: string = "(index?: number) => Promise<void>"

tabfirst

tabfirst: object

doc

doc: string[] = ["Switch to the first tab. "]

type

type: string = "() => Promise<void>"

tablast

tablast: object

doc

doc: string[] = ["Switch to the last tab. "]

type

type: string = "() => Promise<void>"

tabmove

tabmove: object

doc

doc: string[] = ["Move the current tab to be just in front of the index specified.\n\nKnown bug: This supports relative movement with `tabmove +pos` and `tabmove -pos`, but autocomplete doesn't know that yet and will override positive and negative indexes.\n\nPut a space in front of tabmove if you want to disable completion and have the relative indexes at the command line.\n\nBinds are unaffected."]

type

type: string = "(index?: string) => Promise<void>"

tabnext

tabnext: object

doc

doc: string[] = ["Switch to the next tab, wrapping round.\n\nIf increment is specified, move that many tabs forwards."]

type

type: string = "(increment?: number) => Promise<void>"

tabnext_gt

tabnext_gt: object

doc

doc: string[] = ["Switch to the next tab, wrapping round.\n\nIf an index is specified, go to the tab with that number (this mimics the\nbehaviour of `{count}gt` in vim, except that this command will accept a\ncount that is out of bounds (and will mod it so that it is within bounds as\nper [[tabmove]], etc))."]

type

type: string = "(index?: number) => Promise<void>"

tabonly

tabonly: object

doc

doc: string[] = ["Close all other tabs in this window "]

type

type: string = "() => Promise<void>"

tabopen

tabopen: object

doc

doc: string[] = ["Like [[open]], but in a new tab. If no address is given, it will open the newtab page, which can be set with `set newtab [url]`\n\nUse the `-c` flag followed by a container name to open a tab in said container. Tridactyl will try to fuzzy match a name if an exact match is not found.\nUse the `-b` flag to open the tab in the background.\nThese two can be combined in any order, but need to be placed as the first arguments.\n\nUnlike Firefox's Ctrl-t shortcut, this opens tabs immediately after the\ncurrently active tab rather than at the end of the tab list because that is\nthe authors' preference.\n\nIf you would rather the Firefox behaviour `set tabopenpos last`. This\npreference also affects the clipboard, quickmarks, home, help, etc.\n\nIf you would rather the URL be opened as if you'd middle clicked it, `set\ntabopenpos related`.\n\nHinting is controlled by `relatedopenpos`"]

type

type: string = "(...addressarr: string[]) => Promise<void>"

tabprev

tabprev: object

doc

doc: string[] = ["Switch to the previous tab, wrapping round.\n\nIf increment is specified, move that many tabs backwards."]

type

type: string = "(increment?: number) => Promise<any>"

tssReadFromCss

tssReadFromCss: object

doc

doc: string[] = ["Read text content of elements matching the given selector"]

type

type: string = "(selector: string) => void"

ttscontrol

ttscontrol: object

doc

doc: string[] = ["Cancel current reading and clear pending queue\n\nArguments:\n - stop: cancel current and pending utterances"]

type

type: string = "(action: string) => Promise<void>"

ttsread

ttsread: object

doc

doc: string[] = ["Read the given text using the browser's text to speech functionality and\nthe settings currently set"]

type

type: string = "(mode: "-t" | "-c", ...args: string[]) => Promise<void>"

ttsvoices

ttsvoices: object

doc

doc: string[] = ["Show a list of the voices available to the TTS system. These can be\nset in the config using `ttsvoice`"]

type

type: string = "() => Promise<void>"

tutor

tutor: object

doc

doc: string[] = ["Start the tutorial"]

type

type: string = "(newtab?: string) => Promise<void>"

unbind

unbind: object

doc

doc: string[] = ["Unbind a sequence of keys so that they do nothing at all.\n\nSee also:\n\n - [[bind]]\n - [[reset]]"]

type

type: string = "(...args: string[]) => Promise<void>"

undo

undo: object

doc

doc: string[] = ["restore most recently closed tab in this window unless the most recently closed item was a window "]

type

type: string = "() => Promise<void>"

unfocus

unfocus: object

doc

doc: string[] = ["Blur (unfocus) the active element "]

type

type: string = "() => void"

unset

unset: object

doc

doc: undefined[] = []

type

type: string = "(...keys: string[]) => void"

updatenative

updatenative: object

doc

doc: string[] = ["Updates the native messenger if it is installed, using our GitHub repo. This is run every time Tridactyl is updated.\n\nIf you want to disable this, or point it to your own native messenger, edit the `nativeinstallcmd` setting."]

type

type: string = "(interactive?: boolean) => Promise<void>"

url2args

url2args: object

doc

doc: string[] = ["If the url of the current document matches one of your search engines, will convert it to a list of arguments that open/tabopen will understand. If the url doesn't match any search engine, returns the url without modifications.\n\nFor example, if you have searchurls.gi set to \"https://www.google.com/search?q=%s&tbm=isch\", using this function on a page you opened using \"gi butterflies\" will return \"gi butterflies\".\n\nThis is useful when combined with fillcmdline, for example like this: `bind O composite url2args | fillcmdline open`.\n\nNote that this might break with search engines that redirect you to other pages/add GET parameters that do not exist in your searchurl."]

type

type: string = "() => Promise<string>"

urlincrement

urlincrement: object

doc

doc: string[] = ["Increment the current tab URL"]

type

type: string = "(count?: number) => void"

urlmodify

urlmodify: object

doc

doc: string[] = ["Open a URL made by modifying the current URL\n\nThere are several modes:\n\n* Text replace mode: `urlmodify -t <old> <new>`\n\n Replaces the first instance of the text `old` with `new`.\n * `http://example.com` -> (`-t exa peta`) -> `http://petample.com`\n\n* Regex replacment mode: `urlmodify -r <regexp> <new> [flags]`\n\n Replaces the first match of the `regexp` with `new`. You can use\n flags `i` and `g` to match case-insensitively and to match\n all instances respectively\n * `http://example.com` -> (`-r [ea] X g`) -> `http://XxXmplX.com`\n\n* Query replace mode: `urlmodify -q <query> <new_val>`\n\n Replace the value of a query with a new one:\n * `http://e.com?id=foo` -> (`-q id bar`) -> `http://e.com?id=bar\n\n* Query delete mode: `urlmodify -Q <query>`\n\n Deletes the given query (and the value if any):\n * `http://e.com?id=foo&page=1` -> (`-Q id`) -> `http://e.com?page=1`\n\n* Graft mode: `urlmodify -g <graft_point> <new_path_tail>`\n\n \"Grafts\" a new tail on the URL path, possibly removing some of the old\n tail. Graft point indicates where the old URL is truncated before adding\n the new path.\n\n * `graft_point` >= 0 counts path levels, starting from the left\n (beginning). 0 will append from the \"root\", and no existing path will\n remain, 1 will keep one path level, and so on.\n * `graft_point` < 0 counts from the right (i.e. the end of the current\n path). -1 will append to the existing path, -2 will remove the last path\n level, and so on.\n\n ```text\n http://website.com/this/is/the/path/component\n Graft point: ^ ^ ^ ^ ^ ^\n From left: 0 1 2 3 4 5\n From right: -6 -5 -4 -3 -2 -1\n ```\n\n Examples:\n\n * `http://e.com/issues/42` -> (`-g 0 foo`) -> `http://e.com/foo`\n * `http://e.com/issues/42` -> (`-g 1 foo`) -> `http://e.com/issues/foo`\n * `http://e.com/issues/42` -> (`-g -1 foo`) -> `http://e.com/issues/42/foo`\n * `http://e.com/issues/42` -> (`-g -2 foo`) -> `http://e.com/issues/foo`"]

type

type: string = "(mode: "-t" | "-r" | "-q" | "-Q" | "-g", ...args: string[]) => void"

urlparent

urlparent: object

doc

doc: string[] = ["Go to the parent URL of the current tab's URL"]

type

type: string = "(count?: number) => void"

urlroot

urlroot: object

doc

doc: string[] = ["Go to the root domain of the current URL"]

type

type: string = "() => void"

version

version: object

doc

doc: undefined[] = []

type

type: string = "() => void"

viewconfig

viewconfig: object

doc

doc: string[] = ["Opens the current configuration in Firefox's native JSON viewer in the current tab.\n\nNB: Tridactyl cannot run on this page!"]

type

type: string = "(key?: string) => void"

viewcontainers

viewcontainers: object

doc

doc: string[] = ["Shows a list of the current containers in Firefox's native JSON viewer in the current tab.\n\nNB: Tridactyl cannot run on this page!"]

type

type: string = "() => Promise<void>"

viewsource

viewsource: object

doc

doc: string[] = ["Display the (HTML) source of the current page.\n\nBehaviour can be changed by the 'viewsource' setting.\n\nIf the 'viewsource' setting is set to 'default' rather than 'tridactyl',\nthe url the source of which should be displayed can be given as argument.\nOtherwise, the source of the current document will be displayed."]

type

type: string = "(url?: string) => void"

winclose

winclose: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<void>"

winopen

winopen: object

doc

doc: string[] = ["Like [[tabopen]], but in a new window "]

type

type: string = "(...args: string[]) => Promise<void>"

yank

yank: object

doc

doc: string[] = ["Copy content to clipboard without feedback. Use `clipboard yank` for interactive use."]

type

type: string = "(...content: string[]) => Promise<void>"

zoom

zoom: object

doc

doc: undefined[] = []

type

type: string = "(level?: number, rel?: string) => Promise<void>"

src/finding.ts

src/finding.ts: object

elementswithtext

elementswithtext: object

doc

doc: undefined[] = []

type

type: string = "() => any"

filter

filter: object

doc

doc: string[] = ["For each findable element, add a find \nShow only finds prefixed by fstr. Focus first match "]

type

type: string = "(fstr: any) => void"

findPage

findPage: object

doc

doc: undefined[] = []

type

type: string = "(direction?: 1 | -1) => void"

mode

mode: object

doc

doc: undefined[] = []

type

type: string = "(mode: "nav" | "search") => void"

navigate

navigate: object

doc

doc: undefined[] = []

type

type: string = "(n?: number) => void"

pushKey

pushKey: object

doc

doc: string[] = ["If key is in findchars, add it to filtstr and filter "]

type

type: string = "(ke: any) => void"

reset

reset: object

doc

doc: string[] = ["Remove all finds, reset STATE. "]

type

type: string = "(args?: any) => void"

src/finding_background.ts

src/finding_background.ts: object

findPage

findPage: object

doc

doc: undefined[] = []

type

type: string = "(direction: any) => Promise<any>"

findPageNavigate

findPageNavigate: object

doc

doc: undefined[] = []

type

type: string = "(n: number) => Promise<any>"

parser

parser: object

doc

doc: string[] = ["At some point, this might be turned into a real keyseq parser\n\nreset and selectFocusedfinds are OK candidates for map targets in the\nfuture. pushKey less so, I think."]

type

type: string = "(keys: MsgSafeKeyboardEvent[]) => { keys: any[]; ex_str: string; }"

pushKey

pushKey: object

doc

doc: undefined[] = []

type

type: string = "(key: any) => Promise<any>"

reset

reset: object

doc

doc: undefined[] = []

type

type: string = "(args?: { leavemarks: string; }) => Promise<any>"

src/help.ts

src/help.ts: object

addSetting

addSetting: object

doc

doc: string[] = ["Update the doc with aliases fetched from the config "]

type

type: string = "(settingName: string) => Promise<void>"

getCommandElements

getCommandElements: object

doc

doc: string[] = ["Return an object that maps excmd names to excmd documentation element "]

type

type: string = "() => any"

initTridactylSettingElem

initTridactylSettingElem: object

doc

doc: string[] = ["Create the element that should contain keybinding information "]

type

type: string = "(elem: HTMLElement, kind: string) => HTMLElement"

src/hinting.ts

src/hinting.ts: object

buildHintsSimple

buildHintsSimple: object

doc

doc: undefined[] = []

type

type: string = "(els: Element[], onSelect: HintSelectedCallback) => void"

buildHintsVimperator

buildHintsVimperator: object

doc

doc: undefined[] = []

type

type: string = "(els: Element[], onSelect: HintSelectedCallback) => void"

defaultHintBuilder

defaultHintBuilder: object

doc

doc: undefined[] = []

type

type: string = "() => (els: Element[], onSelect: HintSelectedCallback) => void"

defaultHintChars

defaultHintChars: object

doc

doc: undefined[] = []

type

type: string = "() => any"

defaultHintFilter

defaultHintFilter: object

doc

doc: undefined[] = []

type

type: string = "() => (fstr: any) => void"

elementFilterableText

elementFilterableText: object

doc

doc: undefined[] = []

type

type: string = "(el: Element) => string"

filterHintsSimple

filterHintsSimple: object

doc

doc: string[] = ["Show only hints prefixed by fstr. Focus first match "]

type

type: string = "(fstr: any) => void"

filterHintsVimperator

filterHintsVimperator: object

doc

doc: string[] = ["Partition the filter string into hintchars and content filter strings.\nApply each part in sequence, reducing the list of active hints.\n\nUpdate display after all filtering, adjusting labels if appropriate.\n\nConsider: This is a poster child for separating data and display. If they\nweren't so tied here we could do a neat dynamic programming thing and just\nthrow the data at a reactalike."]

type

type: string = "(fstr: any, reflow?: boolean) => void"

hintFocus

hintFocus: object

doc

doc: string[] = ["Hint elements to focus "]

type

type: string = "(selectors?: any) => void"

hintImage

hintImage: object

doc

doc: string[] = ["Hint images, opening in the same tab, or in a background tab"]

type

type: string = "(inBackground: any) => void"

hintKill

hintKill: object

doc

doc: string[] = ["Hint elements and delete the selection from the page"]

type

type: string = "() => void"

hintPage

hintPage: object

doc

doc: string[] = ["For each hintable element, add a hint "]

type

type: string = "(hintableElements: Element[], onSelect: HintSelectedCallback, resolve?: () => void, reject?: () =..."

hintPageWindow

hintPageWindow: object

doc

doc: undefined[] = []

type

type: string = "() => void"

hintPageWindowPrivate

hintPageWindowPrivate: object

doc

doc: undefined[] = []

type

type: string = "() => void"

hintRead

hintRead: object

doc

doc: string[] = ["Hint items and read out the content of the selection "]

type

type: string = "() => void"

hintSave

hintSave: object

doc

doc: string[] = ["Hint link elements to save"]

type

type: string = "(hintType: HintSaveType, saveAs: boolean) => void"

hintableImages

hintableImages: object

doc

doc: string[] = ["Get array of images in the viewport"]

type

type: string = "() => any"

hintables

hintables: object

doc

doc: string[] = ["Array of hintable elements in viewport\n\nElements are hintable if\n 1. they can be meaningfully selected, clicked, etc\n 2. they're visible\n 1. Within viewport\n 2. Not hidden by another element"]

type

type: string = "(selectors?: string, withjs?: boolean) => any"

hintnames

hintnames: object

doc

doc: undefined[] = []

type

type: string = "(n: number, hintchars?: any) => IterableIterator<string>"

hintnames_numeric

hintnames_numeric: object

doc

doc: undefined[] = []

type

type: string = "(n: number) => IterableIterator<string>"

hintnames_short

hintnames_short: object

doc

doc: string[] = ["Shorter hints\n\nHints that are prefixes of other hints are a bit annoying because you have to select them with Enter or Space.\n\nThis function removes hints that prefix other hints by observing that:\n let h = hintchars.length\n if n < h ** 2\n then n / h = number of single character hintnames that would prefix later hints\n\nSo it removes them. This function is not yet clever enough to realise that if n > h ** 2 it should remove\n h + (n - h**2 - h) / h ** 2\nand so on, but we hardly ever see that many hints, so whatever."]

type

type: string = "(n: number, hintchars?: any) => IterableIterator<string>"

hintnames_simple

hintnames_simple: object

doc

doc: string[] = ["An infinite stream of hints\n\nEarlier hints prefix later hints"]

type

type: string = "(hintchars?: any) => IterableIterator<string>"

hintnames_uniform

hintnames_uniform: object

doc

doc: string[] = ["Uniform length hintnames "]

type

type: string = "(n: number, hintchars?: any) => IterableIterator<string>"

killables

killables: object

doc

doc: string[] = ["Array of items that can be killed with hint kill"]

type

type: string = "() => any"

pipe

pipe: object

doc

doc: undefined[] = []

type

type: string = "(selectors?: string) => Promise<[Element, number]>"

pipe_elements

pipe_elements: object

doc

doc: undefined[] = []

type

type: string = "(elements?: any) => Promise<[Element, number]>"

pushKey

pushKey: object

doc

doc: string[] = ["If key is in hintchars, add it to filtstr and filter "]

type

type: string = "(ke: any) => void"

reset

reset: object

doc

doc: string[] = ["Remove all hints, reset STATE.\nIf abort is true, we're resetting because the user pressed escape.\nIf it is false, we're resetting because the user selected a hint."]

type

type: string = "(abort?: boolean) => void"

saveableElements

saveableElements: object

doc

doc: string[] = ["Returns elements that point to a saveable resource"]

type

type: string = "() => any"

selectFocusedHint

selectFocusedHint: object

doc

doc: undefined[] = []

type

type: string = "(delay?: boolean) => void"

src/hinting_background.ts

src/hinting_background.ts: object

parser

parser: object

doc

doc: string[] = ["At some point, this might be turned into a real keyseq parser\n\nreset and selectFocusedHints are OK candidates for map targets in the\nfuture. pushKey less so, I think."]

type

type: string = "(keys: MsgSafeKeyboardEvent[]) => { keys: any[]; ex_str: string; }"

pushKey

pushKey: object

doc

doc: undefined[] = []

type

type: string = "(key: any) => Promise<any>"

reset

reset: object

doc

doc: undefined[] = []

type

type: string = "(abort?: boolean) => Promise<any>"

selectFocusedHint

selectFocusedHint: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any>"

src/itertools.ts

src/itertools.ts: object

chain

chain: object

doc

doc: undefined[] = []

type

type: string = "(...iterables: any[]) => IterableIterator<any>"

enumerate

enumerate: object

doc

doc: undefined[] = []

type

type: string = "(iterable: any) => IterableIterator<any[]>"

filter

filter: object

doc

doc: undefined[] = []

type

type: string = "(iter: any, predicate: any) => IterableIterator<any>"

find

find: object

doc

doc: undefined[] = []

type

type: string = "(iter: any, predicate: any) => any"

flatten

flatten: object

doc

doc: undefined[] = []

type

type: string = "(arr: any) => any[]"

head

head: object

doc

doc: undefined[] = []

type

type: string = "(iter: any) => any"

islice

islice: object

doc

doc: string[] = ["islice(iter, stop) = Give the first `stop` elements \nislice(iter, start, stop)\n skip `start` elements, then give `stop - start` elements,\n unless `stop` is null, then emit indefinitely\n\nIf the iterator runs out early so will this."]

type

type: string = "(iterable: any, start: number, stop?: number) => IterableIterator<any>"

iterEq

iterEq: object

doc

doc: undefined[] = []

type

type: string = "(...arrays: any[]) => boolean"

izip

izip: object

doc

doc: undefined[] = []

type

type: string = "(...arrays: any[]) => IterableIterator<any[]>"

map

map: object

doc

doc: undefined[] = []

type

type: string = "(arr: any, func: any) => IterableIterator<any>"

permutationsWithReplacement

permutationsWithReplacement: object

doc

doc: string[] = ["All permutations of n items from array "]

type

type: string = "(arr: any, n: any) => IterableIterator<any>"

range

range: object

doc

doc: undefined[] = []

type

type: string = "(length: any) => IterableIterator<number>"

tail

tail: object

doc

doc: string[] = ["Get the last item of an array or iterable "]

type

type: string = "(iter: any) => any"

unique

unique: object

doc

doc: undefined[] = []

type

type: string = "(arr: any) => any"

uniqueBy

uniqueBy: object

doc

doc: string[] = ["Yield values that are unique under hasher(value) "]

type

type: string = "(arr: any, hasher: any) => IterableIterator<any>"

zeros

zeros: object

doc

doc: undefined[] = []

type

type: string = "(n: any) => any"

zip

zip: object

doc

doc: string[] = ["Zip some arrays together\n\nIf you need variable length args, you need izip for now."]

type

type: string = "(...arrays: any[]) => any[][]"

src/keydown_background.ts

src/keydown_background.ts: object

addListener

addListener: object

doc

doc: undefined[] = []

type

type: string = "(cb: KeydownCallback) => () => void"

recvEvent

recvEvent: object

doc

doc: undefined[] = []

type

type: string = "(event: MsgSafeKeyboardEvent) => void"

src/keydown_content.ts

src/keydown_content.ts: object

genericResponse

genericResponse: object

doc

doc: undefined[] = []

type

type: string = "(ke: KeyboardEvent, parser: any) => void"

keyeventHandler

keyeventHandler: object

doc

doc: undefined[] = []

type

type: string = "(ke: KeyboardEvent) => void"

modeSpecificSuppression

modeSpecificSuppression: object

doc

doc: string[] = ["Choose to suppress a key or not "]

type

type: string = "(ke: KeyboardEvent) => void"

src/keyseq.test.ts

src/keyseq.test.ts: object

mk

mk: object

doc

doc: undefined[] = []

type

type: string = "(k: any, mod?: KeyModifiers) => MinimalKey"

src/keyseq.ts

src/keyseq.ts: object

bracketexprToKey

bracketexprToKey: object

doc

doc: string[] = ["String starting with a `<` to MinimalKey and remainder.\n\nBracket expressions generally start with a `<` contain no angle brackets or\nwhitespace and end with a `>.` These special-cased expressions are also\npermitted: `<{modifier}<>`, `<{modifier}>>`, and `<{modifier}->`.\n\nIf the string passed does not match this definition, it is treated as a\nliteral `<.`\n\nBackus Naur approximation:\n\n```\n - bracketexpr ::= '<' modifier? key '>'\n - modifier ::= 'm'|'s'|'a'|'c' '-'\n - key ::= '<'|'>'|/[^\\s<>-]+/\n```\n\nSee `src/grammars/bracketExpr.ne` for the canonical definition.\n\nModifiers are case insensitive.\n\nSome case insensitive vim compatibility aliases are also defined, see\n[[expandAliases]].\n\nCompatibility breaks:\n\nShift + key must use the correct capitalisation of key:\n `<S-j> != J, <S-J> == J`.\n\nIn Vim `<A-x> == <M-x>` on most systems. Not so here: we can't detect\nplatform, so just have to use what the browser gives us.\n\nVim has a predefined list of special key sequences, we don't: there are too\nmany (and they're non-standard) [1].\n\nIn the future, we may just use the names as defined in keyNameList.h [2].\n\nIn Vim, you're still allowed to use `<lt>` within angled brackets:\n `<M-<> == <M-lt> == <M-<lt>>`\nHere only the first two will work.\n\nRestrictions:\n\nIt is not possible to map to a keyevent that actually sends the key value\nof any of the aliases or to any multi-character sequence containing a space\nor `>.` It is unlikely that browsers will ever do either of those things.\n\n[1]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\n[2]: https://searchfox.org/mozilla-central/source/dom/events/KeyNameList.h"]

type

type: string = "(inputStr: any) => any[]"

completions

completions: object

doc

doc: string[] = ["returns the fragment of `map` that keyseq is a valid prefix of. "]

type

type: string = "(keyseq: KeyEventLike[], map: Map<MinimalKey[], MapTarget>) => Map<MinimalKey[], MapTarget>"

expandAliases

expandAliases: object

doc

doc: string[] = ["Expand special key aliases that Vim provides to canonical values\n\nVim aliases are case insensitive."]

type

type: string = "(key: string) => any"

hasModifiers

hasModifiers: object

doc

doc: undefined[] = []

type

type: string = "(keyEvent: KeyEventLike) => boolean"

hasNonShiftModifiers

hasNonShiftModifiers: object

doc

doc: string[] = ["shiftKey is true for any capital letter, most numbers, etc. Generally care about other modifiers. "]

type

type: string = "(keyEvent: KeyEventLike) => boolean"

isSimpleKey

isSimpleKey: object

doc

doc: string[] = ["A simple key event is a non-special key (length 1) that is not modified by ctrl, alt, or shift. "]

type

type: string = "(keyEvent: KeyEventLike) => boolean"

mapstrMapToKeyMap

mapstrMapToKeyMap: object

doc

doc: string[] = ["Convert a map of mapstrs (e.g. from config) to a KeyMap "]

type

type: string = "(mapstrMap: Map<string, MapTarget>) => Map<MinimalKey[], MapTarget>"

mapstrObjToKeyMap

mapstrObjToKeyMap: object

doc

doc: undefined[] = []

type

type: string = "(mapstrObj: any) => Map<MinimalKey[], MapTarget>"

mapstrToKeyseq

mapstrToKeyseq: object

doc

doc: string[] = ["Generate KeySequences for the rest of the API.\n\nA map expression is something like:\n\n```\nj scrollline 10\n<C-f> scrollpage 0.5\n<C-d> scrollpage 0.5\n<C-/><C-n> mode normal\n```\n\nA mapstr is the bit before the space.\n\nmapstrToKeyseq turns a mapstr into a keySequence that looks like this:\n\n```\n[MinimalKey {key: 'j'}]\n[MinimalKey {key: 'f', ctrlKey: true}]\n[MinimalKey {key: 'd', ctrlKey: true}]\n[MinimalKey {key: '/', ctrlKey: true}, MinimalKey {key: 'n', ctrlKey: true}]\n```\n\n(All four {modifier}Key flags are actually provided on all MinimalKeys)"]

type

type: string = "(mapstr: string) => MinimalKey[]"

parse

parse: object

doc

doc: undefined[] = []

type

type: string = "(keyseq: KeyEventLike[], map: Map<MinimalKey[], MapTarget>) => ParserResponse"

prefixes

prefixes: object

doc

doc: string[] = ["True if seq1 is a prefix or equal to seq2 "]

type

type: string = "(seq1: KeyEventLike[], seq2: MinimalKey[]) => boolean"

src/math.ts

src/math.ts: object

log

log: object

doc

doc: undefined[] = []

type

type: string = "(x: any, base: any) => number"

src/messaging.ts

src/messaging.ts: object

addListener

addListener: object

doc

doc: string[] = ["Register a listener to be called for each message with type "]

type

type: string = "(type: MessageType, callback: listener) => () => void"

attributeCaller

attributeCaller: object

doc

doc: undefined[] = []

type

type: string = "(obj: any) => (message: Message, sender: any, sendResponse: any) => any"

message

message: object

doc

doc: string[] = ["Send a message to non-content scripts "]

type

type: string = "(type: NonTabMessageType, command: any, args?: any) => Promise<any>"

messageActiveTab

messageActiveTab: object

doc

doc: string[] = ["Message the active tab of the currentWindow "]

type

type: string = "(type: TabMessageType, command: string, args?: any[]) => Promise<any>"

messageAllTabs

messageAllTabs: object

doc

doc: undefined[] = []

type

type: string = "(type: TabMessageType, command: string, args?: any[]) => Promise<any[]>"

messageTab

messageTab: object

doc

doc: undefined[] = []

type

type: string = "(tabId: any, type: TabMessageType, command: any, args?: any) => Promise<any>"

onMessage

onMessage: object

doc

doc: string[] = ["Recv a message from runtime.onMessage and send to all listeners "]

type

type: string = "(message: any, sender: any, sendResponse: any) => void"

src/msgsafe.test.ts

src/msgsafe.test.ts: object

helper

helper: object

doc

doc: undefined[] = []

type

type: string = "(testname: any, obj: any, safeobj: any) => void"

src/msgsafe.ts

src/msgsafe.ts: object

KeyboardEvent

KeyboardEvent: object

doc

doc: string[] = ["MsgSafe copy of keyevent. "]

type

type: string = "(ke: any) => MsgSafeKeyboardEvent"

Node

Node: object

doc

doc: undefined[] = []

type

type: string = "(node: HTMLElement) => MsgSafeNode"

generic

generic: object

doc

doc: string[] = ["Messaging-safe, one level copy of obj\n\nDoesn't work for special objects like Events: Object.keys() is too\nparsimonious."]

type

type: string = "(obj: any) => any"

generic_all_props

generic_all_props: object

doc

doc: string[] = ["Messaging-safe, one level copy of obj\n\nAlso looks at prototype properties. Works for e.g. Event."]

type

type: string = "(obj: any) => any"

pick

pick: object

doc

doc: undefined[] = []

type

type: string = "(o: any, ...props: any[]) => any"

src/native_background.ts

src/native_background.ts: object

clipboard

clipboard: object

doc

doc: string[] = ["Calls an external program, to either set or get the content of the X selection.\nWhen setting the selection or if getting it failed, will return an empty string."]

type

type: string = "(action: "set" | "get", str: string) => Promise<string>"

editor

editor: object

doc

doc: undefined[] = []

type

type: string = "(file: string, content?: string) => Promise<MessageResp>"

ffargs

ffargs: object

doc

doc: string[] = ["This returns the commandline that was used to start firefox.\nYou'll get both firefox binary (not necessarily an absolute path) and flags "]

type

type: string = "() => Promise<string[]>"

firstinpath

firstinpath: object

doc

doc: undefined[] = []

type

type: string = "(cmdarray: any) => Promise<any>"

getBestEditor

getBestEditor: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<string>"

getConfElsePref

getConfElsePref: object

doc

doc: string[] = ["Fetches a config option from the config. If the option is undefined, fetch\na preference from preferences. It would make more sense for this function to\nbe in config.ts but this would require importing this file in config.ts and\nWebpack doesn't like circular dependencies."]

type

type: string = "(confName: string, prefName: string) => Promise<any>"

getConfElsePrefElseDefault

getConfElsePrefElseDefault: object

doc

doc: string[] = ["Fetches a config option from the config. If the option is undefined, fetch\nprefName from the preferences. If prefName is undefined too, return a\ndefault."]

type

type: string = "(confName: string, prefName: string, def: any) => Promise<any>"

getNativeMessengerVersion

getNativeMessengerVersion: object

doc

doc: undefined[] = []

type

type: string = "(quiet?: boolean) => Promise<number>"

getPref

getPref: object

doc

doc: string[] = ["Returns the value for the corresponding about:config setting "]

type

type: string = "(name: string) => Promise<string>"

getPrefs

getPrefs: object

doc

doc: string[] = ["Returns a promise for an object that should contain every about:config\nsetting.\n\nPerformance is slow so we need to cache the results."]

type

type: string = "() => Promise<{ [key: string]: string; }>"

getProfileDir

getProfileDir: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any>"

getenv

getenv: object

doc

doc: undefined[] = []

type

type: string = "(variable: string) => Promise<string>"

getrc

getrc: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<string>"

inpath

inpath: object

doc

doc: undefined[] = []

type

type: string = "(cmd: any) => Promise<boolean>"

loadPrefs

loadPrefs: object

doc

doc: string[] = ["When given the name of a firefox preference file, will load said file and\nreturn a promise for an object the keys of which correspond to preference\nnames and the values of which correspond to preference values.\nWhen the file couldn't be loaded or doesn't contain any preferences, will\nreturn a promise for an empty object."]

type

type: string = "(filename: any) => Promise<{ [key: string]: string; }>"

mkdir

mkdir: object

doc

doc: undefined[] = []

type

type: string = "(dir: string, exist_ok: boolean) => Promise<MessageResp>"

nativegate

nativegate: object

doc

doc: string[] = ["Used internally to gate off functions that use the native messenger. Gives a\nhelpful error message in the command line if the native messenger is not\ninstalled, or is the wrong version."]

type

type: string = "(version?: string, interactive?: boolean, desiredOS?: string[]) => Promise<Boolean>"

parsePrefs

parsePrefs: object

doc

doc: undefined[] = []

type

type: string = "(prefFileContent: string) => Promise<{}>"

pyeval

pyeval: object

doc

doc: string[] = ["Evaluates a string in the native messenger. This has to be python code. If\nyou want to run shell strings, use run() instead."]

type

type: string = "(command: string) => Promise<MessageResp>"

read

read: object

doc

doc: undefined[] = []

type

type: string = "(file: string) => Promise<MessageResp>"

run

run: object

doc

doc: undefined[] = []

type

type: string = "(command: string, content?: string) => Promise<MessageResp>"

sendNativeMsg

sendNativeMsg: object

doc

doc: string[] = ["Posts using the one-time message API; native is killed after message returns"]

type

type: string = "(cmd: MessageCommand, opts: object, quiet?: boolean) => Promise<MessageResp>"

temp

temp: object

doc

doc: undefined[] = []

type

type: string = "(content: string, prefix: string) => Promise<MessageResp>"

winFirefoxRestart

winFirefoxRestart: object

doc

doc: undefined[] = []

type

type: string = "(profiledir: string, browsercmd: string) => Promise<MessageResp>"

write

write: object

doc

doc: undefined[] = []

type

type: string = "(file: string, content: string) => Promise<MessageResp>"

writePref

writePref: object

doc

doc: string[] = ["Writes a preference to user.js "]

type

type: string = "(name: string, value: any) => Promise<void>"

src/newtab.ts

src/newtab.ts: object

getChangelogDiv

getChangelogDiv: object

doc

doc: undefined[] = []

type

type: string = "() => HTMLElement"

readChangelog

readChangelog: object

doc

doc: undefined[] = []

type

type: string = "() => void"

updateChangelogStatus

updateChangelogStatus: object

doc

doc: undefined[] = []

type

type: string = "() => void"

src/number.mod.ts

src/number.mod.ts: object

euclid_mod

euclid_mod: object

doc

doc: string[] = ["Always gives a positive result.\n\nEquivalent to knuth_mod when divisor is +ve\nEquivalent to % when dividend is +ve"]

type

type: string = "(dividend: any, divisor: any) => number"

knuth_mod

knuth_mod: object

doc

doc: string[] = ["Takes sign of divisor -- incl. returning -0 "]

type

type: string = "(dividend: any, divisor: any) => number"

my_mod

my_mod: object

doc

doc: string[] = ["Equivalent to knuth_mod but doesn't return -0 "]

type

type: string = "(dividend: any, divisor: any) => number"

src/requests.ts

src/requests.ts: object

clobberCSP

clobberCSP: object

doc

doc: string[] = ["Reduce CSP safety to permit tridactyl to run correctly\n\nstyle-src needs 'unsafe-inline' (hinting styles) and 'self' (mode indicator hiding)\nscript-src needs 'unsafe-eval' (event hijacking)\n - but that's pretty dangerous, so maybe we shouldn't just clobber it?\nsandbox must not be set\n\nThis only needs to happen because of a Firefox bug and we should stop doing\nit when they fix the bug."]

type

type: string = "(response: any) => { responseHeaders: any; } | {}"

src/scrolling.ts

src/scrolling.ts: object

getDuration

getDuration: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any>"

getSmooth

getSmooth: object

doc

doc: undefined[] = []

type

type: string = "() => Promise<any>"

recursiveScroll

recursiveScroll: object

doc

doc: string[] = ["Tries to find a node which can be scrolled either x pixels to the right or\ny pixels down among the Elements in {nodes} and children of these Elements.\n\nThis function used to be recursive but isn't anymore due to various\nattempts at optimizing the function in order to reduce GC pressure."]

type

type: string = "(x: number, y: number, nodes?: Element[], ignore?: Element[]) => Promise<void>"

scroll

scroll: object

doc

doc: string[] = ["Tries to scroll e by x and y pixel, make the smooth scrolling animation\nlast duration milliseconds"]

type

type: string = "(x: number, y: number, e: HTMLElement, duration?: number) => Promise<boolean>"

src/styling.ts

src/styling.ts: object

capitalise

capitalise: object

doc

doc: undefined[] = []

type

type: string = "(str: any) => any"

prefixTheme

prefixTheme: object

doc

doc: undefined[] = []

type

type: string = "(name: any) => string"

retheme

retheme: object

doc

doc: undefined[] = []

type

type: string = "() => void"

theme

theme: object

doc

doc: undefined[] = []

type

type: string = "(element: any) => Promise<void>"

src/test_utils.ts

src/test_utils.ts: object

testAll

testAll: object

doc

doc: string[] = ["Test each case in testcases.\n\nWarning: if your function really accepts an array, that array must be\ndouble wrapped"]

type

type: string = "(toTest: any, testcases: any) => void"

testAllCustom

testAllCustom: object

doc

doc: string[] = ["Test each case in testcases against an arbitrary expectAttr and eval'd Arg\n\nFor eval:\n - `ans` is an array containing the result of the function\n - `args` is an array of input arguments to the function\n - `toTest` is the function you gave as input"]

type

type: string = "(toTest: any, testcases: any, expectAttr: any, expectArg: any) => void"

testAllNoError

testAllNoError: object

doc

doc: string[] = ["Call function with each testcase and check it doesn't throw "]

type

type: string = "(toTest: any, testcases: any) => void"

testAllObject

testAllObject: object

doc

doc: undefined[] = []

type

type: string = "(toTest: any, testcases: any) => void"

wrapPrimitives

wrapPrimitives: object

doc

doc: undefined[] = []

type

type: string = "(testcases: any) => any"

src/text_to_speech.ts

src/text_to_speech.ts: object

doAction

doAction: object

doc

doc: string[] = ["Control any reading in progress\n\nNote: pause() doesn't seem to work, so play, pause and playpause arent going\nto be very useful right now"]

type

type: string = "(action: Action) => void"

getVoiceFromName

getVoiceFromName: object

doc

doc: string[] = ["Find the voice object for a voice name"]

type

type: string = "(name: string) => SpeechSynthesisVoice"

listVoices

listVoices: object

doc

doc: string[] = ["Get a list of the installed TTS voice names, by which users\ncan refer to the vocies for use in config"]

type

type: string = "() => string[]"

readText

readText: object

doc

doc: string[] = ["Read the text using the borwser's HTML5 TTS API"]

type

type: string = "(text: string) => void"

src/tridactyl.d.ts

src/tridactyl.d.ts: object

exportFunction

exportFunction: object

doc

doc: undefined[] = []

type

type: string = "(func: Function, targetScope: object, options?: { defineAs?: string; allowCrossOriginArguments?: ..."

html

html: object

doc

doc: undefined[] = []

type

type: string = "(strings: TemplateStringsArray, ...values: any[]) => HTMLElement"

src/url_util.test.ts

src/url_util.test.ts: object

test_download_filename

test_download_filename: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_increment

test_increment: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_parent

test_parent: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_query_delete

test_query_delete: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_query_replace

test_query_replace: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_root

test_root: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_url_graft_path

test_url_graft_path: object

doc

doc: undefined[] = []

type

type: string = "() => void"

test_url_query_interpolation

test_url_query_interpolation: object

doc

doc: undefined[] = []

type

type: string = "() => void"

src/url_util.ts

src/url_util.ts: object

deleteQuery

deleteQuery: object

doc

doc: string[] = ["Delete a query (and its value) in a URL\n\nIf a query appears multiple times (which is a bit odd),\nall instances are removed"]

type

type: string = "(url: URL, matchQuery: string) => URL"

getDownloadFilenameForUrl

getDownloadFilenameForUrl: object

doc

doc: string[] = ["Get a suitable default filename for a given URL\n\nIf the URL:\n- is a data URL, construct from the data and mimetype\n- has a path, use the last part of that (eg image.png, index.html)\n- otherwise, use the hostname of the URL\n- if that fails, \"download\""]

type

type: string = "(url: URL) => string"

getExtensionForMimetype

getExtensionForMimetype: object

doc

doc: string[] = ["Very incomplete lookup of extension for common mime types that might be\nencountered when saving elements on a page. There are NPM libs for this,\nbut this should cover 99% of basic cases"]

type

type: string = "(mime: string) => string"

getUrlParent

getUrlParent: object

doc

doc: string[] = ["Get the parent of the current URL. Parent is determined as:\n\n* if there is a hash fragment, strip that, or\n* If there is a query string, strip that, or\n* Remove one level from the path if there is one, or\n* Remove one subdomain from the front if there is one"]

type

type: string = "(url: any, count?: number) => any"

getUrlQueries

getUrlQueries: object

doc

doc: string[] = ["Get an Array of the queries in a URL.\n\nThese could be like \"query\" or \"query=val\""]

type

type: string = "(url: URL) => string[]"

getUrlRoot

getUrlRoot: object

doc

doc: string[] = ["Get the root of a URL"]

type

type: string = "(url: any) => URL"

graftUrlPath

graftUrlPath: object

doc

doc: string[] = ["Graft a new path onto some parent of the current URL\n\nE.g. grafting \"by-name/foobar\" onto the 2nd parent path:\n example.com/items/by-id/42 -> example.com/items/by-name/foobar"]

type

type: string = "(url: URL, newTail: string, level: number) => URL"

incrementUrl

incrementUrl: object

doc

doc: string[] = ["URL handling utlity functions\nIncrement the last number in a URL.\n\n(perhaps this could be made so you can select the \"nth\" number in a\nURL rather than just the last one?)"]

type

type: string = "(url: any, count: any) => string"

interpolateSearchItem

interpolateSearchItem: object

doc

doc: string[] = ["Interpolates a query or other search item into a URL\n\nIf the URL pattern contains \"%s\", the query is interpolated there. If not,\nit is appended to the end of the pattern.\n\nIf the interpolation point is in the query string of the URL, it is\npercent encoded, otherwise it is is inserted verbatim."]

type

type: string = "(urlPattern: URL, query: string) => URL"

replaceQueryValue

replaceQueryValue: object

doc

doc: string[] = ["Replace the value of a query in a URL with a new one"]

type

type: string = "(url: URL, matchQuery: string, newVal: string) => URL"

setUrlQueries

setUrlQueries: object

doc

doc: string[] = ["Update a URL with a new array of queries"]

type

type: string = "(url: URL, qys: string[]) => void"