-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,32 @@ | ||
# tab-command-palette-extension | ||
A text editor style command palette specifically for working with tabs. Hit `Command`/`Control` `Shift` `P`, and you can: | ||
- Search open tabs | ||
- Create a new blank tab | ||
- Create tab opening for bookmarks | ||
- Close the active tab | ||
- Bookmark the active tab | ||
This is an extension that will try to guide you into using existing tabs instead of opening duplicates, and finding old or abandoned tabs with useful content. There are two parts to this extension: | ||
|
||
First, there is a server ("background script"). It runs in the background, maintaing a list of every open tab and its contents. It also maintains a history of tabs that have closed. | ||
|
||
Second, there is a script that will be added to every tab you open ("content script") that will contact the server when a page loads and also contacts the server when a page is left. It has one additional responsibility, to highlight content on the page. | ||
|
||
## terminology | ||
- tab: a page that is open, has a tabId and has a windowId | ||
- bookmark: metadata about a page to be loaded later | ||
- page: content of a page whether it's open or not | ||
This extension can be used from the Omnibox location bar by typing `> `. Once open, you can search and open URLs by title, URL or page contents. Searching is powered by the [Lunr.js](https://github.com/olivernn/lunr.js) search engine. Especially when opening by search, the extension will attempt to highlight matches on the page. | ||
|
||
# Installing | ||
|
||
First, build it. | ||
``` | ||
git clone https://github.com/altintx/tab-command-palette-extension.git | ||
cd tab-command-palette-extension | ||
npm install | ||
npm run build | ||
``` | ||
|
||
Second, add it to your browser. | ||
open chrome://extensions | ||
Enable developer mode | ||
Press "Load Unpacked Extension" | ||
You'll be prompted for the folder. If you don't know where it is, try `tab-command-palette-extension` under your home directory. | ||
|
||
# Using | ||
|
||
(If you're on a Mac use `Command` not `Control`.) | ||
|
||
Press `Control`+`L`, then type `> `. | ||
|
||
This developer's muscle memory won't stop pressing `Control`+`Shift`+`P` so there's a naggy message to hit `Control`+`L` instead. |