Chrome-Store-Foxified icon indicating copy to clipboard operation
Chrome-Store-Foxified copied to clipboard

Suggestion

Open mikhoul opened this issue 6 years ago • 3 comments

Hi,

I had a problem to convert an CRX to XPI and I found that one of the problem was that some API don't have the same name for Chrome and Firefox.

So just changing the name (search/replace) does the trick for those compatibility "bugs".

Exemple:

chrome.extension.onConnect used here, needs to be updated to use runtime.onConnect
chrome.extension.onMessage used here needs to be updated to use runtime.onMessage

Suggestion: The addon could have the option to parse the JS files for "chrome.extension." and replace all instance with "runtime." before submitting and saving the addon,

It could be an experimental feature with a checkbox that would try to improve compatibility.

Regards :octocat:

mikhoul avatar Oct 20 '17 03:10 mikhoul

That is a super cool idea!!! I already extract and modify the manifest, i can simply to a find and replace on that too! Superb idea thank you!

Noitidart avatar Oct 24 '17 06:10 Noitidart

Duplicate of #65

Of course, in my suggestion, the idea is to instead implement a script that is injected into every extension that does chrome.extension.onMessage = chrome.runtime.onMessage, etc.

ExE-Boss avatar Nov 07 '17 03:11 ExE-Boss

I think our two options are:

  • Inject the script into all content scripts, background page, and any other application pages and paste a script at the top.
  • Do a find and replace, but that will be tricky too because of webpack'ed extensions.

Both are tricky in their own way.

Noitidart avatar Nov 07 '17 03:11 Noitidart