Giter Site home page Giter Site logo

sethcottle / tabcloser Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 3.0 442 KB

TabCloser automatically closes redirected tabs for Asana, Discord, Figma, Linear, Notion, Slack, Spotify, VS Code Live Share, Webex, and Zoom.

Home Page: https://tabcloser.com

License: GNU General Public License v3.0

JavaScript 46.79% HTML 53.21%
auto-close chrome-extension chromium-extension edge-extension tab tab-management

tabcloser's Introduction

TabCloser 3

What is TabCloser? | TabCloser Options | URL Schemas | Privacy and Permissions | Installing TabCloser | License

What is TabCloser?

Keep your tabs tidy, so you can stay focused. TabCloser eliminates those pesky leftover tabs from Asana, Discord invites, Figma files, Linear, Notion, Slack, Spotify, VS Code Live Share, Webex meetings, and Zoom meetings—leaving you with a clean browser and a clear path to productivity.

Tabs

TabCloser Options

By default, Asana, Discord invites, Figma, Notion, Slack, Spotify, VS Code Live Share, Webex Joins, and Zoom Joins are enabled. Just deselect any service that you don't want tabs to close for automatically. You can also change the interval that TabCloser uses to close a new tab once a new tab has been opened, by default it's 15 seconds.

TabCloser Options

Custom URLs

TabCloser 3 brings the ability to add custom URLs to the detection criteria. TabCloser will only close URLs that are an exact match to what is entered. That means if the URL is https://example.com/ instead of https://example.com, TabCloser will not close the tab because the trailing / is missing from the end of the entry. The Custom URL options is great for closing out out specific pages you may use, like leftover tabs from SSO, VPN, ..etc redirect pages.

TabCloser Custom URL

URL Schema

Let's breakdown how TabCloser decides if it should close a tab. TabCloser is using regular expressions to look for a partial match on a dedicated URL for each service.

Here's how TabCloser is handling URLs for each service:

^: The start of the URL

https?://: This will match "http://" or "https://"

([a-z0-9-]+\\.)?: This isn't included in each service, but it's to detect a subdomain, followed by a dot "."

example\\.com/: This matches the primary URL of a particular service

Asana

For Asana, TabCloser is using ^https?://app\\.asana\\.com/-/desktop_app_link\\?.*.

The app.asana.com/-/desktop_app_link? designates that an Asana link is being redirected to the native Asana client. .* will match any string that follows the ?.

AWS IAM Access Authorization

For the "Authorization Successful" page of the AWS IAM identity sign in flow, TabCloser is using ^https://[a-z0-9-]+\\.awsapps\\.com/start/user-consent/login-success.html

It only matches on secure connections, as that page would never be served over a non-secure one. The domain [a-z0-9-]+.awsapps.com should capture any AWS organization (the subdomain), and the regex only matches on the login-success.html page to make sure login errors would not be hidden from you.

Discord

For Discord, TabCloser is using ^https?://discord\\.com/invite/.

The /invite/ is associated with a Discord invite which can be opened in the Discord desktop client.

Figma

For Figma, TabCloser is using three patterns: ^https?://(?:www\.)?figma\.com/design/ for Figma Design files, ^https?://(?:www\.)?figma\.com/board/ for FigJam files, and ^https?://(?:www\.)?figma\.com/slides/ for Figma Slide files (note that TabCloser will not close /presentation/ files from shared Slide presentations).

TabCloser will not close tabs for Figma Community profiles, templates, plugins, ..etc. Only file URLs which can be redirected to the Figma desktop client.

Linear

For Linear, TabCloser is using ^https?://linear\\.app/.*\\?noRedirect=1$'

The \\?noRedirect=1$ designates that the URL was successfully redirected to the Linear desktop client.

Microsoft Teams

For Microsoft Teams, TabCloser is using ^https?://teams\\.microsoft\\.com/dl/launcher/.*

The teams\\.microsoft\\.com matches the domain "teams.microsoft.com.". /dl/launcher/ is looking for the Teams launcher page that givesm you the ability to download, use the web app, or launch in your current Teams install.

Notion

For Notion, TabCloser is using ^https?://www\\.notion\\.so/native/.*&deepLinkOpenNewTab=true

The ^https?://www\\.notion\\.so/native/ designates that it's being redirected to the native client. The .* allows for any string of content after the base URL. Then TabCloser is looking for an exact match on &deepLinkOpenNewTab=true to make sure the redirect was successful.

Slack

For Slack, TabCloser is using ^https?://(?!(app\\.slack\\.com|slack\\.com|api\\.slack\\.com|.*\\/(customize|account|apps)(\\/|$)|.*\\/home(\\/|$)))[a-z0-9-]+\\.slack\\.com/.*$

(?!(app\\.slack\\.com|slack\\.com|api\\.slack\\.com|.*\\/(customize|account|apps)(\\/|$)|.*\\/home(\\/|$))) is a negative lookahead assertion, that specifies what should not follow the previous part of the regex. app\\.slack\\.com excludes URLs starting with "app.slack.com" to make sure the web client can successfully stay open. slack\\.com excludes the base Slack website. .*\\/(customize|account|apps)(\\/|$), api\\.slack\\.com excludes URLs starting with "api.slack.com", .*\\/home(\\/|$) exclude URLs containing '/customize/', '/account/', '/apps/' or /home either followed by a slash or the end of the string—this is to avoid TabCloser from closer in-browsers settings and config pages for Slack.

Spotify

For Spotify, TabCloser is using ^https?://open\\.spotify\\.com

The open\\. portion is typically associated with opening a song, artist, playlist, ..etc which can be opened in the Spotify desktop client.

VS Code Live Share

For Live Share, TabCloser is using ^https?://vscode\\.dev/liveshare.

The /liveshare/ is associated with the Live Share URL which can be opened in the VS Code desktop client.

Webex

For Webex, TabCloser is using ^https?://([a-z0-9-]+\\.)?webex\\.com/wbxmjs/joinservice.

The webex\\.com/wbxmjs/joinservice is associated with the join meeting URL which can be opened in the Webex desktop client.

Zoom

For Zoom, TabCloser is using ^https?://([a-z0-9-]+\\.)?zoom\\.us/[js]/[^/]+.*#success$

([a-z0-9-]+\\.)? matches to any subdomain that your Zoom may be using. zoom\\.us/ matches the core URL. [js]/ matches the /j/ and /s/ paths that the redirect URL may encounter. [^/]+ matches the meeting ID. .* matches anything between the meeting ID and #success, this accounts for things like a pwd being included in the URL. And of course, #success$ matches the "#success" at the end of URL that has been successfully redirected to the Zoom client.

Requested Permissions

TabCloser requests a few permissions in the manifest.json file.

tabs allows TabCloser to interact with your tabs, giving it the ability to run when a new tab is detected and if a matched URL is found, close that tab automatically.

storage allows TabCloser to save your enabled or disabled auto close preferences for a particular service, saves custom URLs you enter, and saves the interval you've set for closing tabs from the options menu.

Privacy

TabCloser runs completely locally in your browser. It does not collect any analytics, it does not store any information about your tabs or browser history, it does not send any data back for processing or analysis. Your data is yours and yours alone.

Installing TabCloser

TabCloser is available in the Google Chrome Web Store, the Microsoft Edge Add-ons Store, and available for manual download and installation.

Get on the Google Chrome Web Store

Get on the Microsoft Edge Store

Get on the macOS App Store

Download the Latest GitHub Release

For Chrome

Download the latest release and unzip it. Then navigate to chrome://extensions/ and enable "Developer mode" using the toggle in the top right corner. Upload the extension manually by pressing "Load unpacked" and selecting the unzipped TabCloser folder.

For Edge

Download the latest release and unzip it. Then navigate to edge://extensions/ and enable "Developer mode" in the left sidebar, it's near the bottom. Upload the extension manually by pressing "Load unpacked" and selecting the unzipped TabCloser folder.

For Safari

tabcloser-3.2.2-macos.zip is available for download in the latest release. You can unzip this and drag TabCloser.app to your Applications folder. TabCloser.app was created using Xcode and signed for Direct Distribution, however there are a few steps you'll need to take to enable it. Once you install TabCloser you'll need to launch Safari and go to Safari > Settings > Advanced and check Show features for web developers. Once you've done that, go to the Developer tab and enable Allow unsigned extensions. Need help? Watch the installation video.

Support the Addon

You can support TabCloser by contributing through these links:

Buy Me A Coffee

PayPal

GitHub Sponsors

Signing up through these services through these affiliate links is also a good way to support TabCloser.

Try DigitalOcean

Try Fathom Analytics

License

Copyright (C) 2023-2024 Seth Cottle

TabCloser is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

TabCloser is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Please see the GNU General Public License for more details.

tabcloser's People

Contributors

maximisch avatar sethcottle avatar shayelkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tabcloser's Issues

Options Saving Arc Browser

Having a few issues saving settings in Arc Browser. This is likely related to the way Arc handles chrome.storage. Working through some debugging.

As I work through this, I added in a lot more debug logs to TabCloser that output to the console in 78a4436. These will be turned off by default but you'll be able to manually download TabCloser and turn it on yourself by changing const DEBUG = false; to const DEBUG = true;.

We'll need to verify if you can deselect a service in the options menu and if Arc will store that preference. Need to verify if you can update the seconds in the interval check and if Arc will successfully store that interval preference.

https://arc.net/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.