Skip to content

Commit

Permalink
fix: move tabs after pinned tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
amerikan committed Oct 12, 2023
1 parent 804b0a6 commit 361fb7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ async function orderTabsByDomain() {
});
}

const totalPinnedTabs = tabs
.filter((tab) => tab.pinned)
.reduce((acc) => 1 + acc, 0);

await browser.tabs.move(newTabPositionIds, {
index: 0,
index: totalPinnedTabs,
});
}

Expand Down

0 comments on commit 361fb7d

Please sign in to comment.