Clarify viewconfig help

This commit is contained in:
Oliver Blanthorn 2021-03-20 17:13:43 +01:00
parent b71eedf4bb
commit 1f7ea2c9ed
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -4181,10 +4181,13 @@ export function get(...keys: string[]) {
return done
}
/** Opens the current configuration in Firefox's native JSON viewer in the current tab.
/**
* Opens the current configuration in Firefox's native JSON viewer in a new tab.
*
* @param key - The specific key you wish to view (e.g, nmaps, autocmds.DocLoad). Also accepts the arguments `--default` or `--user` to view the default configuration, or your changes.
*
* NB: the configuration won't update if you refresh the page - you need to run `:viewconfig` again.
*
*/
//#background
export function viewconfig(...key: string[]) {
@ -4210,7 +4213,7 @@ export function viewconfig(...key: string[]) {
export async function jsonview(...json: string[]) {
const tab = await tabopen("-w")
const url = "data:application/json," + encodeURIComponent(json.join(" "))
return browser.tabs.executeScript(tab.id, {code: `window.location.href = "${url}";`})
return browser.tabs.executeScript(tab.id, { code: `window.location.href = "${url}";` })
}
/**