Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-Close

A Chrome extension that closes tabs matching URL rules you define. Built for the junk pages that pile up on their own — the GCP auth_success tab left behind after gcloud auth login, OAuth callback pages, "you may now close this window" screens, and the rest.

Add a rule, and the next time a matching tab appears, it closes itself. Rules persist across sessions and sync across the Chrome browsers you're signed into.

Install

It's an unpacked extension — no store, no build step.

  1. Unzip this folder somewhere permanent (don't delete it later; Chrome loads it from disk).
  2. Go to chrome://extensions.
  3. Turn on Developer mode (top right).
  4. Click Load unpacked and select the unzipped auto-close folder.
  5. Pin it: click the puzzle-piece toolbar icon, then the pin next to Auto-Close.

Use it

Click the toolbar icon to open the panel.

  • Add this page — grabs the current tab's URL, strips the query string, and pre-fills a rule. This is the one-click path: when you're sitting on the leftover auth_success tab, open the panel and hit it. The rule saves and closes the tab you're on.
  • New rule — add a pattern by hand.
  • The amber dot in the header is the armed indicator. Pulsing = on. Grey = off. The On/Off switch arms or disarms everything at once without deleting your rules.
  • Each rule has its own on/off switch, an edit pencil, and a delete button, plus a running closed count so you can see which rules are actually earning their keep.

How matching works

Pick a match type per rule:

  • Starts with (default) — the URL begins with your text. Best for pages that append changing query strings, e.g. https://cloud.google.com/sdk/auth_success matches …/auth_success?code=abc123.
  • Exact — the URL equals your text, character for character.
  • Contains — your text appears anywhere in the URL.
  • Wildcard* stands in for anything, e.g. https://*.google.com/*/auth_success.

Before you save, the panel tells you exactly how many of your currently open tabs the rule would close, and flags it if a pattern is broad enough to be dangerous. Patterns broad enough to nuke everything (*, bare https://, etc.) are blocked.

There's an optional close delay in the footer if you'd rather glance at a page for half a second before it disappears. Default is Instant.

Where your data lives, and what it can see

  • Rules and settingschrome.storage.sync (small, syncs across your signed-in Chrome browsers).
  • Close counterschrome.storage.local (stays on the machine; these update on every close and would otherwise burn the sync write quota).
  • Backup & restore → the options page (Backup & restore in the footer) exports rules to a JSON file and imports them back. It opens in a full tab because file pickers don't behave reliably inside a popup.

Permissions are deliberately minimal: tabs (to read tab URLs and close matching tabs) and storage (to remember your rules). No host permissions, so the install warning stays small. Nothing leaves your browser — there's no network code.

Files

auto-close/
  manifest.json     MV3 manifest
  background.js     service worker — watches navigations, closes matches
  match.js          shared matching logic (background + popup use the same code)
  popup.html/.css/.js   the toolbar panel
  options.html/.js  backup & restore + rules overview
  icons/            16 / 32 / 48 / 128

About

A Chrome extension that closes tabs matching URL rules you define. Built for the junk pages that pile up on their own — the GCP `auth_success` tab left behind after `gcloud auth login`, OAuth callback pages, "you may now close this window" screens, and the rest.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages