https://github.com/nakasyou/firecws
Chrome拡張をFirefox拡張にコンパイルできるライブラリ
https://github.com/nakasyou/firecws
chrome firefox firefox-addon webstore
Last synced: 9 months ago
JSON representation
Chrome拡張をFirefox拡張にコンパイルできるライブラリ
- Host: GitHub
- URL: https://github.com/nakasyou/firecws
- Owner: nakasyou
- License: other
- Created: 2023-08-03T10:55:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-05T10:45:34.000Z (over 2 years ago)
- Last Synced: 2024-12-29T13:32:17.897Z (over 1 year ago)
- Topics: chrome, firefox, firefox-addon, webstore
- Language: TypeScript
- Homepage:
- Size: 254 KB
- Stars: 31
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

### FireCws
FireCws compiles web extensions written for Chrome (.crx) into ones usable in Firefox (.xpi).
## Why?
One of the Firefox's weak points is that extensions in the world's largest browser extension marketplace, namely the Chrome Web Store, cannot be used. This is the solution.
## How?
### Install it
```shell
npm i firecws #npm
yarn add firecws #yarn
pnpm add firecws #pnpm
bun add firecws #bun
```
### Import it
```ts
import * as firecws from 'firecws' // Node/Bun
import * as firecws from 'npm:firecws' // Deno
import * as firecws from 'jsr:@ns/firecws' // JSR(wip)
```
### Use it
Download a .crx extension from the Chrome Web Store:
```ts
const extensionId = 'ophjlpahpchlmihnnnihgmmeilfjmjjc' // LINE
const crxExt = await firecws.fromWebStore(extensionId)
```
Then, compile it to .xpi:
```ts
const { xpi } = await firecws.compile(crxExt, {
// Options
}, progress => {
// Progress callback
})
xpi // Uint8Array
```
## Extension support table
- 💯 - Working completely
- ✅ - No problems
- ⭕ - Problems, but mostly usable
- 🤔 - Errors occur, inconvenient to use
- ❌ - Can't install
| Name | Extension version checked | FireCws version checked | Status |
| --- | --- | --- | --- |
| [LINE](https://chromewebstore.google.com/detail/line/ophjlpahpchlmihnnnihgmmeilfjmjjc?hl=en-US) | 3.1.2 | 0.2.0 | 🤔 |
## Problems
The compilation code is a little bloated and is slow.
## Special Thanks
- @EdamAme-x
- Information on how LINE uses the origin and advice on how to fix it
## License
Unless otherwise specified, all files are licensed under the MIT License.
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md)!