Make config docs a bit useful

This commit is contained in:
Oliver Blanthorn 2018-05-11 19:46:44 +01:00
parent 230d718af6
commit 14d7acc531
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 36 additions and 20 deletions

View file

@ -31,9 +31,9 @@ function schlepp(settings) {
// TODO: have list of possibilities for settings, e.g. hintmode: reverse | normal // TODO: have list of possibilities for settings, e.g. hintmode: reverse | normal
let USERCONFIG = o({}) let USERCONFIG = o({})
const DEFAULTS = o({ const _DEFAULTS = {
configversion: "0.0", configversion: "0.0",
nmaps: o({ nmaps: {
"<F1>": "help", "<F1>": "help",
o: "fillcmdline open", o: "fillcmdline open",
O: "current_url open", O: "current_url open",
@ -132,13 +132,19 @@ const DEFAULTS = o({
".": "repeat", ".": "repeat",
"<SA-ArrowUp><SA-ArrowUp><SA-ArrowDown><SA-ArrowDown><SA-ArrowLeft><SA-ArrowRight><SA-ArrowLeft><SA-ArrowRight>ba": "<SA-ArrowUp><SA-ArrowUp><SA-ArrowDown><SA-ArrowDown><SA-ArrowLeft><SA-ArrowRight><SA-ArrowLeft><SA-ArrowRight>ba":
"open https://www.youtube.com/watch?v=M3iOROuTuMA", "open https://www.youtube.com/watch?v=M3iOROuTuMA",
}), },
autocmds: o({ autocmds: {
DocStart: o({ DocStart: {
"addons.mozilla.org": "mode ignore", "addons.mozilla.org": "mode ignore",
}), },
}), },
exaliases: o({
/**
* Aliases for use in the command line. The key is replaced with the value.
*
* Related ex command: `command`
*/
exaliases: {
alias: "command", alias: "command",
au: "autocmd", au: "autocmd",
b: "buffer", b: "buffer",
@ -169,13 +175,13 @@ const DEFAULTS = o({
openwith: "hint -W", openwith: "hint -W",
"!": "exclaim", "!": "exclaim",
"!s": "exclaim_quiet", "!s": "exclaim_quiet",
}), },
followpagepatterns: o({ followpagepatterns: {
next: "^(next|newer)\\b|»|>>|more", next: "^(next|newer\\b|»|>>|more",
prev: "^(prev(ious)?|older)\\b|«|<<", prev: "^(prev(ious?|older\\b|«|<<",
}), },
searchengine: "google", searchengine: "google",
searchurls: o({ searchurls: {
google: "https://www.google.com/search?q=", google: "https://www.google.com/search?q=",
scholar: "https://scholar.google.com/scholar?q=", scholar: "https://scholar.google.com/scholar?q=",
googleuk: "https://www.google.co.uk/search?q=", googleuk: "https://www.google.co.uk/search?q=",
@ -199,7 +205,7 @@ const DEFAULTS = o({
gentoo_wiki: gentoo_wiki:
"https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search=", "https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search=",
qwant: "https://www.qwant.com/?q=", qwant: "https://www.qwant.com/?q=",
}), },
newtab: "", newtab: "",
viewsource: "tridactyl", // "tridactyl" or "default" viewsource: "tridactyl", // "tridactyl" or "default"
@ -210,7 +216,7 @@ const DEFAULTS = o({
// Controls whether the page can focus elements for you via js // Controls whether the page can focus elements for you via js
// Remember to also change browser.autofocus (autofocusing elements via // Remember to also change browser.autofocus (autofocusing elements via
// HTML) in about:config // HTML in about:config
// Maybe have a nice user-vicible message when the setting is changed? // Maybe have a nice user-vicible message when the setting is changed?
allowautofocus: "true", allowautofocus: "true",
@ -234,21 +240,21 @@ const DEFAULTS = o({
modeindicator: "true", modeindicator: "true",
// Default logging levels - 2 === WARNING // Default logging levels - 2 === WARNING
logging: o({ logging: {
messaging: 2, messaging: 2,
cmdline: 2, cmdline: 2,
controller: 2, controller: 2,
hinting: 2, hinting: 2,
state: 2, state: 2,
excmd: 1, excmd: 1,
}), },
noiframeon: [], noiframeon: [],
// Native messenger settings // Native messenger settings
// This has to be a command that stays in the foreground for the whole editing session // This has to be a command that stays in the foreground for the whole editing session
// "auto" will attempt to find a sane editor in your path. // "auto" will attempt to find a sane editor in your path.
// Please send your requests to have your favourite terminal moved further up the list to /dev/null. // Please send your requests to have your favourite terminal moved further up the list to /dev/null.
// (but we are probably happy to add your terminal to the list if it isn't already there). // (but we are probably happy to add your terminal to the list if it isn't already there.
editorcmd: "auto", editorcmd: "auto",
browser: "firefox", browser: "firefox",
nativeinstallcmd: nativeinstallcmd:
@ -263,7 +269,8 @@ const DEFAULTS = o({
// Security settings // Security settings
csp: "untouched", // change this to "clobber" to ruin the CSP of all sites and make Tridactyl run a bit better on some of them, e.g. raw.github* csp: "untouched", // change this to "clobber" to ruin the CSP of all sites and make Tridactyl run a bit better on some of them, e.g. raw.github*
}) }
const DEFAULTS = o(_DEFAULTS)
/** Given an object and a target, extract the target if it exists, else return undefined /** Given an object and a target, extract the target if it exists, else return undefined

View file

@ -937,6 +937,15 @@ ul.tsd-descriptions h4 {
} }
.tsd-parent-kind-object-literal > h3, .tsd-sources {
display: none
}
.tsd-parent-kind-object-literal > .tsd-signature {
border: none
}
/* Other changes: /* Other changes:
* - removed all background images in CSS above * - removed all background images in CSS above