Table of Contents

Open New Tab After Current Tab

Return to Browser Tabs, OneTab

Open New Tab After Current Tab

Opens new tab after the active tab, instead of last position.

By default a new tab is opened at the end of the row of tabs, but it's not intuitive — in fact, it is INSANE!!!

With this extension a new tab opened with the keyboard shortcut (⌘ Cmd+T) or with the “plus” button will be opened just after the current active tab, “as God intended it”.


The Code

https://github.com/ArnaudLigny/Open-New-Tab-After-Current-Tab/blob/master/src/background.js

This code is part of a Chrome extension designed to manage the placement of new tabs. It aims to position new tabs right after the currently active tab, even as tabs are moved around or closed.

**Core Functionality**

**Event Listeners**

**Key Points**

**In Summary**

This Chrome extension code provides a way to automatically place new tabs after the current active tab, maintaining this behavior even as tabs are moved or closed. It uses event listeners to track changes in the browser's state and adjust the tab placement accordingly.