Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/adalidbori/Tab-Closer-Ext/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Tab Closer is a Chrome extension that automatically manages your open tabs by limiting the maximum number of tabs you can have open at once. When you exceed your configured limit, the oldest tabs are automatically closed to maintain your desired tab count.
This extension is perfect for users who tend to accumulate too many tabs and want to maintain a clean, organized browsing experience.

Installation

1

Download the Extension

Download the Tab Closer extension files from the repository or Chrome Web Store.
2

Load the Extension in Chrome

If installing from source:
  1. Open Chrome and navigate to chrome://extensions/
  2. Enable “Developer mode” in the top right corner
  3. Click “Load unpacked” and select the extension directory
The extension icon will appear in your Chrome toolbar.
3

Configure Your Settings

Click the extension icon to open the popup and configure your tab limit.

Quick Configuration

Once installed, you’ll see a simple popup interface with two main controls:
The ON/OFF switch at the top of the popup controls whether the extension is actively monitoring and closing tabs. When enabled (green “ON”), the extension will automatically close excess tabs. When disabled (red “OFF”), all tabs will remain open regardless of your limit.
// The extension checks this value before closing tabs
chrome.storage.local.get('fs', function (result) {
    fs = result.fs;
    if (fs) {
        // Extension is enabled, proceed with tab management
    }
});
The number input allows you to set the maximum number of tabs allowed. This value must be at least 2 tabs.
// Minimum validation in script.js
const tabsallow = document.getElementById('tabsallow').value;
if(tabsallow >= 2){
  chrome.storage.local.set({ fs: checkbox.checked }).then(() => {
    chrome.storage.local.set({ tabsallow: tabsallow }).then(() => {
      document.getElementById("labelverde").style.visibility="visible";
    });
  });
}else{
  alert('La cantidad debe ser mayor que uno!')
}

Setting Your First Tab Limit

1

Click the Extension Icon

Open the Tab Closer popup by clicking the extension icon in your Chrome toolbar.
2

Enable the Extension

Make sure the toggle switch is set to “ON” (green). This activates the automatic tab closing feature.
3

Set Your Tab Limit

Enter a number in the “Cantidad de Tabs permitidas (2+)” field. For example:
  • 5 tabs - Good for focused work
  • 10 tabs - Balanced for general browsing
  • 20 tabs - More relaxed tab management
The minimum value is 2 tabs. The extension will show an alert if you try to set a lower limit.
4

Save Your Settings

Click the “Save” button. You’ll see a green “Saved!” confirmation message appear.

Testing Your Configuration

After saving your settings, test the extension:
Current tabs: 3
Action: Open 3 new tabs
Result: Oldest tabs are automatically closed, keeping only 5 tabs open
The extension monitors tab creation in real-time. Whenever you open a new tab, it checks your current tab count against your configured limit and automatically closes the oldest tabs if necessary.

Next Steps

Configuration

Learn about all configuration options and advanced settings

How It Works

Understand the technical implementation and Chrome API usage

Troubleshooting

  1. Check that the toggle switch is set to “ON”
  2. Verify your tab limit is set to at least 2
  3. Click “Save” after making any changes
  4. Try reloading the extension from chrome://extensions/
This is intentional. The extension requires a minimum of 2 tabs to function properly and prevent accidentally closing all your tabs.
// Validation in background.js
if (cantidadTabs >= 2) {
    if (tabs.length > cantidadTabs) {
        // Close excess tabs
    }
}
The extension uses chrome.storage.local to persist settings. If settings aren’t saving:
  1. Check Chrome’s storage permissions for the extension
  2. Try removing and reinstalling the extension
  3. Check the browser console for any error messages