giosilvi / GPT-Prompter

Browser extension to get a fast prompt (of the selected text) for OpenAI`s GPT-3, GPT-4 & ChatGPT API . Available in the Chrome web store and Firefox browser add-ons
https://chrome.google.com/webstore/detail/gpt-prompter/lcgpdbficokndjodlcgflbhaibicompp/overview
MIT License
226 stars 54 forks source link

feat: Firefox support #10

Open sammcj opened 2 years ago

sammcj commented 2 years ago

It would be awesome if this extension had Firefox support - it's really great!

giosilvi commented 2 years ago

Thanks for the comment! I have to admit this is my first ever chrome extension, and I don`t know how it works for Firefox. As soon as it reaches a mature version (I think a few months more of experimenting) I will look into porting it to Firefox too.

Stvad commented 1 year ago

@giosilvi they have a compatible API, so usually most of the porting consists substituting chrome.* calls to browser.* calls (with https://github.com/mozilla/webextension-polyfill installed) to get a cross-browser support up and running. there are a bunch of cross-browser extension templates out there that can serve as a good example)

giosilvi commented 1 year ago

@Stvad thanks for the info! I'll take a look at it and make the implementation in the next month or so...

giosilvi commented 1 year ago

Hi @Stvad and @sammcj, I published the extension on Firefox as well! There was some modification involved, mostly on the manifest.json. At the moment, there is a bit of an unusual behavior when first loading a webpage, where one may need to reload the page to make the extension work. I'll try to fix that in the next days, but for the rest, everything seems to work just fine. You can find it here: https://addons.mozilla.org/en-GB/firefox/addon/gpt-prompter/

sammcj commented 1 year ago

Oh wow that's fantastic news! Thank you so much, I'll test it out this week.

giosilvi commented 1 year ago

I reopened the issue cause I saw some strange behavior on Firefox with some elements of Outlook when the extension is enabled. Need to investigate, the same situation on Chrome show now issue. If you see the same on other website let me know. Basically if anything seems to break, and is fixed when disabling the extension.