doc:string[] = ["Expands the alias in the provided exstr recursively. Does nothing if\nthe command is not aliased, including when the command is invalid."]
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."]
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."]
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."]
doc:string[] = ["Read all user configuration from storage API then notify any waiting asynchronous calls\n\nasynchronous calls generated by getAsync."]
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."]
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."]
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)!"]
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. "]
doc:string[] = ["Replaces the page's HTMLElement.prototype.focus with our own, onPageFocus "]
type
type:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
kind
kind: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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
kind
kind:string = "void"
isEditableHTMLInput
isEditableHTMLInput:object
doc
doc:string[] = ["Returns whether the passed HTML input element is editable"]
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"]
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"]
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"]
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"]
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"]
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\""]
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"]
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`."]
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]]"]
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 --!>"]
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."]
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."]
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."]
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]]"]
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]]"]
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."]
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`"]
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`"]
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."]
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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
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**."]
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."]
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`."]
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."]
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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
kind
kind:string = "string"
getNativeVersion
getNativeVersion:object
doc
doc:undefined[] = []
type
type:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
getSortedWinTabs
getSortedWinTabs:object
doc
doc:string[] = ["Get list of tabs sorted by most recent use"]
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."]
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 no way to display these HTML tooltips from the keyboard.\n\ne.g. `:help bind`"]
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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
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)`"]
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`"]
doc:string[] = ["Tells you if the native messenger is installed and its version."]
type
type:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
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."]
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."]
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."]
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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
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."]
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."]
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."]
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."]
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"]
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."]
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."]
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."]
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."]
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))."]
doc:string[] = ["Close all other tabs in this window "]
type
type:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
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\n tabopenpos related`.\n\nHinting is controlled by `relatedopenpos`"]
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."]
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."]
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`\n *\n * @param mode The replace mode:\n * * -t text replace\n * * -r regexp replace\n * * -q replace the value of the given query\n * * -Q delete the given query\n * * -g graft a new path onto URL or parent path of it\n * @param replacement the replacement arguments (depends on mode):\n * * -t <old> <new>\n * * -r <regexp> <new> [flags]\n * * -q <query> <new_val>\n * * -Q <query>\n * * -g <graftPoint> <newPathTail>\n *"]
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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
arguments
arguments:object[] = [{"kind": "void"}]
kind
kind:string = "Promise"
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."]
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."]
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."]
doc:string[] = ["Get array of images in the viewport"]
type
type:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
kind
kind: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"]
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."]
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:object
arguments
arguments:undefined[] = []
kind
kind:string = "function"
type
type:object
kind
kind:string = "void"
saveableElements
saveableElements:object
doc
doc:string[] = ["Returns elements that point to a saveable resource"]
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."]
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."]
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"]
doc:string[] = ["Generate KeySequences for the rest of the API.\n\nA map expression is something like:\n\n```\n j 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)"]
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."]
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 "]
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."]
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."]
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."]
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."]
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."]
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."]
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."]
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"]
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"]
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\""]
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"]
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"]
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"]
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?)"]
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."]