mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Play golf
This commit is contained in:
parent
64ebee2f2b
commit
049cd81739
1 changed files with 1 additions and 9 deletions
|
@ -2511,7 +2511,6 @@ export async function fullscreen() {
|
|||
*/
|
||||
//#background
|
||||
export async function tabclose(...indexes: string[]) {
|
||||
let done
|
||||
async function maybeWinTabToTabId(id: string) {
|
||||
if (id.includes(".")) {
|
||||
const [winid, tabindex_number] = await parseWinTabIndex(id)
|
||||
|
@ -2519,14 +2518,7 @@ export async function tabclose(...indexes: string[]) {
|
|||
}
|
||||
return idFromIndex(id)
|
||||
}
|
||||
let ids
|
||||
if (indexes.length > 0) {
|
||||
// Request to close multiple tabs
|
||||
ids = await Promise.all(indexes.map(index => maybeWinTabToTabId(index)))
|
||||
} else {
|
||||
// Request to close the current tab
|
||||
ids = [await activeTabId()]
|
||||
}
|
||||
const ids = await Promise.all(indexes.length > 0 ? indexes.map(maybeWinTabToTabId) : [activeTabId()])
|
||||
const tabclosepinned = (await config.getAsync("tabclosepinned") === "true")
|
||||
if (!tabclosepinned) {
|
||||
// Pinned tabs should not be closed, abort if one of the tabs is pinned
|
||||
|
|
Loading…
Add table
Reference in a new issue