From 1be6897200e37d20a92e7d91560461d54d23c4cd Mon Sep 17 00:00:00 2001 From: Dranaxel Date: Sun, 24 May 2020 14:41:37 +0200 Subject: [PATCH] fixing indents --- src/excmds.ts | 6 ++++-- src/lib/config.ts | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/excmds.ts b/src/excmds.ts index 15b63f26..522fa5eb 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -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. diff --git a/src/lib/config.ts b/src/lib/config.ts index 6544a5f9..08099e53 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -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" } /**