4 ms·
PSA: If you're making a browser extension, please support Firefox as well, not just Chrome. Firefox makes it easy since they support the `chrome` namespace for
by satvikpendem 4y ago
PSA: If you're making a browser extension, please support Firefox as well, not just Chrome. Firefox makes it easy since they support the `chrome` namespace for functions [0].
You can also use React/Next.js or another frontend library too if you prefer. I had created an extension a while ago out of pure HTML, CSS, and TypeScript but I found that was quite annoying to add more complex features with lots of state. I switched to Next.js and it's now on par with regular web DX [1].
[0]
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
[1] https://css-tricks.com/nextjs-chrome-extension-starter/ https://css-tricks.com/nextjs-chrome-extension-starter/
- dom96 4y agoThe problem with supporting Firefox is that it doesn't yet support manifest v3. I know this support is coming, but seeing as Chrome right now disallows new extensions that don't use v3 it feels pretty delayed. It's also unclear how to test manifest v3 Firefox extensions before the support is officially out there (though maybe there isn't even beta support yet?)
- tech234a 4y agoIt is coming on Tuesday with the release of Firefox 109.
- alphabet9000 4y agofirefox/mozilla doesn't really make it easy (compared to chrome) mozilla now requires "add-on signing" [0]; extensions now have to be "signed" (By mozilla) before you can permanently side-load your own private extension onto regular firefox. they also require you to use 2FA [1] when setting up a firefox.com account (which is required in order for you to upload extensions so they can be signed). at least with chrome you can just enable 'developer mode' and drag and drop your own extensions and use it right away without having to deal with any of that. [0] https://blog.mozilla.org/addons/2020/03/10/support-for-extension-sideloading-has-ended/ https://blog.mozilla.org/addons/2020/03/10/support-for-exten... [1] https://blog.mozilla.org/addons/2021/03/11/two-factor-authentication-required-for-extension-developers/ https://blog.mozilla.org/addons/2021/03/11/two-factor-authen...
- 2h 4y agoYep. Firefox is my browser, but their add-on story is garbage.
- cdrini 4y agoHuh? To the best of my knowledge, to get a development extension working in FF: 1. Ctrl-shift-a to open add-ons page 2. Click the cog, and select "debug add-ons" 3. Click "load temporary add-on" 4. Select a file in your extension. 5. Done. This worked for me earlier this week.
- deleted 4y ago[deleted]
- user982 4y agoKey word from the grandparent post: "permanently" Key word from the parent post: "temporary"
- cdrini 4y agoAh I reckon what you meant was "Oh this approach only temporarily installed the add-on, your parent post was asking about a way to permanently install an add-on." Took me a while to figure out what you meant. Ah missed that; yep, the add-on will remain installed until the browser is restarted. That is a little annoying!
- jakear 4y agoHm. I tried this with an super simple extension[1] I had lying around and couldn't get any network requests to work. The error thrown in console was a generic "NetworkError", but the network tab shows no relevant entries at all. Not a great developer experience, especially compared to chromium. https://github.com/JacksonKearl/FeelingBlue/blob/main/extension/chromium/manifest.json https://github.com/JacksonKearl/FeelingBlue/blob/main/extens...
- cdrini 4y ago
- FractalHQ 4y agoSvelte / Sveltekit also works great and is a bit more lightweight / performant while being easier / faster to develop with. I have an implementation on GitHub for my personal hybrid bookmark-manager / hackernews-reader newtab extension[0]. Its still a wip but i use the website version[1] daily as it doesn’t need to be installed and can still be set as my newtab page (warning as I’ve never opened it on mobile). [0] https://github.com/fractalhq/nutab https://github.com/fractalhq/nutab [1] https://nutab.vercel.app https://nutab.vercel.app
- deleted 4y ago[deleted]
- nirvdrum 4y agoDo you have any pointers on effective profiling strategies of extensions on Firefox? I tried to contribute to an open source extension and ran into an issue where the "Performance" tab won't work [1]. I tried using the Firefox Profiler, but that's for the whole browser. It can work, but it gives too much noise. I love Firefox, but this put a huge damper on my willingness to work on browser extensions. [1] -- https://bugzilla.mozilla.org/show_bug.cgi?id=1766271 https://bugzilla.mozilla.org/show_bug.cgi?id=1766271
- gklitt 4y agoFWIW, I also shipped Twemex on Firefox, but the userbase is comparatively tiny—-about 20x more users on Chrome (or Chromium-based browsers using the Chrome store) compared to Firefox. I’m excited about the ongoing push towards cross-browser standards in this area; Safari has become way more compatible recently as well.
- satvikpendem 4y agoHaha, thanks for that, I am one of your few Firefox users for Twemex. Congrats on the acquisition, how is that going?
- geraldwhen 4y agoFirefox’s signing process is terrible. I’ve made several extensions and I would rather just stick to chrome.
- deleted 4y ago[deleted]
- peterhil 4y agoI have made this even easier with Rosegarden, so that you can just use a promisified browser object in both Firefox and Chrome! The library is tiny, under 5 kb. https://github.com/peterhil/rosegarden https://github.com/peterhil/rosegarden