zubyj / leetcode-explained

Browser extension that adds video solutions, company tags, and GPT code analysis into Leetcode problems
https://leetcodeapp.com
MIT License
83 stars 13 forks source link

Extension for Mozilla Firefox #36

Closed geckguy closed 1 year ago

geckguy commented 1 year ago

We could create the same extension for Firefox, will the new ad-block changes coming there will be a lot of users shifting to Firefox from Chrome, so this would be a great addition.

zubyj commented 1 year ago

Thats a great idea. I think we just need to modify the manifest.json and change Chrome API to firefox which is something like

chrome.storage -> browser.storage 
geckguy commented 1 year ago

Can i work on it?

geckguy commented 1 year ago

Should I maybe create a separate repo for the Firefox extension which points towards this repo

zubyj commented 1 year ago

Can i work on it?

Yes please 🙏

zubyj commented 1 year ago

Should I maybe create a separate repo for the Firefox extension which points towards this repo

Sure thats a good idea. We could also use polyfill. Theres a few options here. Let me research it a bit more and I'll get back to you soon

zubyj commented 1 year ago

Also, I'm in California so our time zones are opposites 💀

geckguy commented 1 year ago

Ahah, its fine. Get back to me whenever and ill proceed

zubyj commented 1 year ago

Yeah so I think we should go with this

WebExtensions Polyfill: This is a library developed by Mozilla that allows you to write code that is compatible with both Chrome and Firefox. By using the polyfill, your extension code will use browser-agnostic methods that work on both platforms. This can save you a lot of time and effort, as you won't need to write separate code for each browser.

We can copy what this repo is doing https://github.com/interstellard/chatgpt-advanced/

I think just all Ts files that use the chrome API need to be replaced with Browser

We can maybe add the following import to those files

import Browser from 'webextension-polyfill

zubyj commented 1 year ago

This way it'll work on both chrome and firefox. What do you think? Lemme know if u find another idea. You can create a branch and get started if you want. I'll be here if you have any q's

geckguy commented 1 year ago

This way it'll work on both chrome and firefox. What do you think? Lemme know if u find another idea. You can create a branch and get started if you want. I'll be here if you have any q's

your idea sounds good to me, i'll look into it and get started

geckguy commented 1 year ago

I've created a branch in my fork, will send a PR to the main branch when everything works well

zubyj commented 1 year ago

Hi. I finished this feature 8a1bd80dc14ca31d848dab7eac5f3f9026c58a55

I will add the link to the firefox version once its published. Let me know if you'd like to work on other features in the future. Cheers!