commit bb4c82deac665b2a12bed2c1015388c735e9c05c Author: He4eT Date: Fri Jan 19 19:35:19 2024 +0100 Initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c257e39 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 80 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b1c8b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/dist diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6305361 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Alexey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..62b5189 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +dist_dir = dist +filename = tabswitcher.xpi + +cleanup: + rm -rf ${dist_dir} + +package: cleanup + mkdir ${dist_dir} + zip -r -FS ./${dist_dir}/${filename} * \ + --exclude './dist/*' \ + --exclude './screenshots/*' \ + --exclude '*.git*' + +# vim: set ts=4 sw=4 autoindent noexpandtab: diff --git a/README.md b/README.md new file mode 100644 index 0000000..c5560a2 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Tabswiper + +A Firefox extension that enhances tab switching and closing through fuzzy search. + +## How to Use It + +1. Open the search page using the extension icon or by pressing `F2`. +You can customize the keyboard shortcut by accessing the `Manage Extension Shortcuts` in Firefox settings. + +1. Filter the list of open tabs with the searchbox. + +1. If there is one tab left in the list, navigate to it by pressing `Enter`. + +1. Otherwise, navigate to or close the desired tab using the commandbox. + +## Development + +### Adding an Unpacked Extension to Firefox + +1. In the Firefox address bar, type `about:debugging` and press Enter. + +1. Click on `This Firefox`, then select `Load Temporary Add-on...`. + +1. Choose the `manifest.json` file. + +### Build the Package + +To generate the XPI file, just use the `make package` command. +The output file will be stored in the `dist` directory. diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..e25499b --- /dev/null +++ b/manifest.json @@ -0,0 +1,26 @@ +{ + "action": { + "default_title": "Tabswitcher" + }, + "browser_specific_settings": { + "gecko": { + "id": "tabswitcher@oddsquat.org", + "strict_min_version": "110.0" + } + }, + "commands": { + "_execute_action": { + "suggested_key": { + "default": "F2" + } + } + }, + "description": "Switch to a tab or close unwanted ones using fuzzy search", + "homepage_url": "https://github.com/He4eT/tabswitcher", + "manifest_version": 3, + "name": "Tabswitcher", + "permissions": [ + "tabs" + ], + "version": "1.0.0" +}