Giter Site home page Giter Site logo

firecws's Introduction

image

FireCws

FireCws は、Chrome用に書かれた拡張機能(.crx)をFirefox用拡張機能(.xpi)にコンパイルするライブラリです。 また、それを用いたChrome WebStoreからFirefoxでインストールできるようにする拡張機能も含まれていました。

なんのために?

Firefoxの欠点として、世界最大のブラウザ拡張機能プラットフォームである、Chrome Web Storeが使えない点がありました。それを解決します。

つかいかた

デフォルトのプラグインを用いてコンパイラを作成:

import { Compiler, defaultPlugins } from 'https://firecws.deno.dev/x'

const compiler = new Compiler({
  plugins: [
    ...defaultPlugins()
  ]
})

Crx FileをChrome Web Storeから読み込み:

import { loadFromChromeWebStore } from 'https://firecws.deno.dev/x'

const extensionId = 'ophjlpahpchlmihnnnihgmmeilfjmjjc' // LINE
const crxData = await loadFromChromeWebStore(extensionId) // Uint8Array

Crx FileからExtensionを作成:

const extension = compiler.fromUint8Array(crxData, {
  extensionId: extensionId // Optional, これがないと動かない場合がある
})

Extensionをxpiにコンパイル:

const xpiData = await extension.compile().compiled // Uint8Array

サポート一覧表

  • 💯 - 完全に動作することが証明済み
  • ✅ - 不自然な点なし
  • ⭕ - 不自然な点があるが、大体の機能は使える
  • 🤔 - エラーがでたりして、完全に機能が使えない。不便。
  • ❌ - インストールができない
名前 チェック時拡張機能バージョン チェック時FireCwsバージョン Status
LINE 3.1.2 0.2.0 🤔

問題点

コンパイル構造が肥大化していて、かなりコンパイルが遅いです。

Special Thanks

  • @EdamAme-x
    • LINE が origin を判定している事実とその解決策のアドバイス

ライセンス

特にファイルに明記してない限り、MIT LICENSEとします。

貢献

CONTRIBUTING.mdを読んでみてください

firecws's People

Contributors

nakasyou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

edamame-x

firecws's Issues

Releases の xpi 形式が誤っている

extensions フォルダー下に本体が存在しているため、Nightly や Dev Editon、Floorp では直接インストールできなくなっています。

以下のファイルを .xpi にリネームして再アップロードされることを推奨します。
firefox.zip

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.