fixing indents

This commit is contained in:
Dranaxel 2020-05-24 14:41:37 +02:00
parent 3c73886b3f
commit 1be6897200
2 changed files with 6 additions and 4 deletions

View file

@ -2336,7 +2336,9 @@ export async function tabclose(...indexes: string[]) {
*/
//#background
export async function tabcloseallto(side: string) {
if !(["left", "right"].includes(side)) throw("side argument must be left or right")
if (!(["left", "right"].includes(side))) {
throw "side argument must be left or right"
} else {
const tabs = await browser.tabs.query({
pinned: false,
currentWindow: true,
@ -2346,9 +2348,9 @@ export async function tabcloseallto(side: string) {
const comp = side == "right" ? tab => tab.index > atab.index : tab => tab.index < atab.index
const ids = tabs.filter(comp).map(tab => tab.id)
return browser.tabs.remove(ids)
}
}
/** Restore the most recently closed item.
The default behaviour is to restore the most recently closed tab in the
current window unless the most recently closed item is a window.

View file

@ -573,8 +573,8 @@ export class default_config {
extp: "extpreferences",
prefset: "setpref",
prefremove: "removepref",
tabclosealltoright: "tabcloseallto right"
tabclosealltoleft: "tabcloseallto left"
tabclosealltoright: "tabcloseallto right",
tabclosealltoleft: "tabcloseallto left"
}
/**