Skip to content

Commit

Permalink
new bug tracker extension
Browse files Browse the repository at this point in the history
fix #41
  • Loading branch information
noraj committed Aug 15, 2024
1 parent b2a5afb commit 741f0f6
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 157 deletions.
3 changes: 3 additions & 0 deletions .web-ext-config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export default {
verbose: false,
build: {
overwriteDest: true
},
};
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## [1.0.6 - Unreleased]
## [2.0.0]

- Firefox for Android support [#35](https://github.com/noraj/firefox-extension-arch-search/pull/35) (thanks @sangsatori)
- Remove extensions related to the old bug tracker and introduce an extension for the new one

## [1.0.5]

Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ name | shortcut | Install
ArchLinux Packages Search | `alpkgs` | [AMO][arch-pkgs]
ArchLinux Wiki Search | `alwiki` | [AMO][arch-wiki]
ArchLinux User Repository (AUR) Search | `alaur` | [AMO][arch-aur]
ArchLinux Bugtracker (by FS) Search | `albugsfs` | [AMO][arch-bugs-fs]
ArchLinux Bugtracker (by text) Search | `albugst` | [AMO][arch-bugs-t]
~~ArchLinux Bugtracker (by FS) Search~~ | ~~`albugsfs`~~ | ~~[AMO][arch-bugs-fs]~~
~~ArchLinux Bugtracker (by text) Search~~ | ~~`albugst`~~ | ~~[AMO][arch-bugs-t]~~
ArchLinux Bugtracker Search | `albugs` | [AMO][arch-bugs]
ArchLinux Forum (by author) Search | `alforuma` | [AMO][arch-forum-a]
ArchLinux Forum (by keywords) Search | `alforumk` | [AMO][arch-forum-k]
ArchLinux manual pages | `alman` | [AMO][arch-man]
Expand All @@ -33,24 +34,24 @@ ArchLinux manual pages | `alman` | [AMO][arch-man]

* Clone the repo
* Install tools:
* [Node.js](https://nodejs.org) via [asdf](https://asdf-vm.com/)
* [Bun](https://bun.sh/) via [asdf](https://asdf-vm.com/)
* Install dependencies:
* `npm i`
* `bun i`
* Lint (check for manifest syntax errors)
* `npm run lint -- -s web-extensions/v3/<ext-name>`
* `bun run --bun lint -- -s web-extensions/v3/<ext-name>`
* Run add-on in isolated Firefox instance using [web-ext](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext) (open the [Browser Toolbox](https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox) for console logging):
* `npm run run -- -s web-extensions/v3/<ext-name>`
* `bun run run -- -s web-extensions/v3/<ext-name>`
* Package for distribution:
* One extension: `npm run build -- -s web-extensions/v3/<ext-name>`
* All extensions: `npm run buildAll`
* One extension: `bun run build -- -s web-extensions/v3/<ext-name>`
* All extensions: `bun run buildAll`

## FAQ

- [Why is there one extension per search engine?](https://stackoverflow.com/questions/64304959/is-it-possible-to-add-multiple-search-engines-in-the-same-firefox-web-extension)
- After the installation, I still don't see the new search enines. Where are there?
- After the installation, I still don't see the new search enines. Where are there?
- Disable/Enable the extensions, this will reload them and they'll appear.
- It's possible to add the search engines by clicking the plus button on the search bar, so why an extension?
- It's way quicker to install the extension rather than manually adding the search engines. An extension also allows automation.
- It's way quicker to install the extension rather than manually adding the search engines. An extension also allows automation.
- The bug tracker & the forum use advanced search with several parameters so it's not possible to add them manually via the search bar, an extension is mandatory.

[amo]:(https://addons.mozilla.org/)
Expand Down
15 changes: 7 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/sh
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-pkgs -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-wiki -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-aur -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-bugs-fs -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-bugs-t -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-forum-a -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-forum-k -a ./dist
web-ext build --overwrite-dest -s ./web-extensions/v3/arch-man -a ./dist
web-ext build -s ./web-extensions/v3/arch-pkgs -a ./dist
web-ext build -s ./web-extensions/v3/arch-wiki -a ./dist
web-ext build -s ./web-extensions/v3/arch-aur -a ./dist
web-ext build -s ./web-extensions/v3/arch-bugs -a ./dist
web-ext build -s ./web-extensions/v3/arch-forum-a -a ./dist
web-ext build -s ./web-extensions/v3/arch-forum-k -a ./dist
web-ext build -s ./web-extensions/v3/arch-man -a ./dist
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"scripts": {
"lint": "web-ext lint",
"build": "web-ext build --overwrite-dest -a ./dist",
"build": "web-ext build -a ./dist",
"buildAll": "./build.sh",
"run": "web-ext run"
},
Expand Down
31 changes: 0 additions & 31 deletions web-extensions/v2/arch-bugs-fs/manifest.json

This file was deleted.

12 changes: 0 additions & 12 deletions web-extensions/v2/arch-bugs-t/icons/arch.svg

This file was deleted.

31 changes: 0 additions & 31 deletions web-extensions/v2/arch-bugs-t/manifest.json

This file was deleted.

File renamed without changes
31 changes: 31 additions & 0 deletions web-extensions/v2/arch-bugs/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"manifest_version": 2,
"name": "ArchLinux Bugtracker Search",
"short_name": "archlinux_search_bugs",
"description": "Adds ArchLinux Bugtracker as a search engine.",
"version": "1.0.0",
"icons": {
"16": "icons/arch.svg",
"64": "icons/arch.svg",
"256": "icons/arch.svg"
},
"chrome_settings_overrides": {
"search_provider": {
"name": "ArchLinux Bugtracker",
"keyword": "albugs",
"favicon_url": "https://gitlab.archlinux.org/uploads/-/system/appearance/favicon/1/lol3.png",
"search_url": "https://gitlab.archlinux.org/archlinux/packaging/packages/{searchTerms}/-/issues"
}
},
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "55.0"
},
"gecko_android": {
"strict_min_version": "121.0"
}
},
"author": "noraj",
"homepage_url": "https://github.com/noraj/firefox-extension-arch-search"
}
31 changes: 0 additions & 31 deletions web-extensions/v3/arch-bugs-fs/manifest.json

This file was deleted.

1 change: 0 additions & 1 deletion web-extensions/v3/arch-bugs-t/icons/arch-bt.svg

This file was deleted.

31 changes: 0 additions & 31 deletions web-extensions/v3/arch-bugs-t/manifest.json

This file was deleted.

31 changes: 31 additions & 0 deletions web-extensions/v3/arch-bugs/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"manifest_version": 3,
"name": "ArchLinux Bugtracker Search",
"short_name": "archlinux_search_bugs",
"description": "Adds ArchLinux Bugtracker as a search engine.",
"version": "1.0.0",
"icons": {
"16": "icons/arch-b.svg",
"64": "icons/arch-b.svg",
"256": "icons/arch-b.svg"
},
"chrome_settings_overrides": {
"search_provider": {
"name": "ArchLinux Bugtracker",
"keyword": "albugs",
"favicon_url": "icons/arch-b.svg",
"search_url": "https://gitlab.archlinux.org/archlinux/packaging/packages/{searchTerms}/-/issues"
}
},
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "109.0"
},
"gecko_android": {
"strict_min_version": "121.0"
}
},
"author": "noraj",
"homepage_url": "https://github.com/noraj/firefox-extension-arch-search"
}

0 comments on commit 741f0f6

Please sign in to comment.