zubyj/leetcode-explained

Extension for Mozilla Firefox

Closed this issue ยท 12 comments

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

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 

Can i work on it?

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

zubyj commented

Can i work on it?

Yes please ๐Ÿ™

zubyj commented

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

Also, I'm in California so our time zones are opposites ๐Ÿ’€

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

zubyj commented

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

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

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

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

zubyj commented

Hi. I finished this feature 8a1bd80

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!