Live data from Hacker News

For your next side project, make a browser extension

geoffreylitt.com

261–270 of 286 posts

Re: For your next side project, make a browser extension

#261
post #241
post #94

The author acknowledges but doesn't go into depth on Manifest V3, and that's basically the only reason I don't really want to write a browser extension.

its bad to churn from v2 to v3 but whats so bad about writing a fresh v3 extension?

APIs I want to use being unavailable, forcing local installs as the only installation option.

Re: For your next side project, make a browser extension

#262
post #2

A lot of the most useful software I've made for myself has been browser extensions. Spend too much time on Hacker News? I made an extension to freeze the front page so it updates once every 6 hours. Spend too much time on Reddit? I made an extension requiring a password to be input for every page I visit. Want to extensively filter LinkedIn jobs, and track which jobs you've applied to? I made an extension to apply ve…

There's a good chance a lot of these plug-ins could be vastly simplified and just written as user scripts in Tampermonkey, so you might want to look into that.

I don't want to have to do that though. To use a car analogy, don't give me an autoshop/factory filled with tools and machines and metal and plastic, I want to be able to just buy the truck.

Re: For your next side project, make a browser extension

#263
post #28

No, don't. They're not that hard to code, but both Google and Mozilla keep making changes and then bitching at you through their app stores to change your thing. I recently dropped Chrome support on an add-on because 90% of the users were on Firefox. Since it blocked some ads, I figured Google would continue to whine, and it wasn't worth the hassle.

The lack of platform control creates a paradox where the more useful the extension you make, the more you're beholden to dance to somebody else's tune, ad infinitum, in order to retain the advantage you've created. Unpredictability is at the heart of it. You can invest x $/time, and not know if what you've created is going to stand for 1 year, or 10.

On the gripping hand, when the platforms in question are the dominant platforms of, err, all computing in this era, then the above described issue tends to be a minor one, in context, for many applications.

Re: For your next side project, make a browser extension

#264
post #53

I very briefly looked into extensions for some things I wanted to do, but got kind of lost in the documentation. The browsers seem to expose a very large API and I failed to figure out if it supports what I wanted. Essentially what I wanted was to be able to implement a simplified version of the "wget" command. I wanted to be able to invoke the extension on a page and have it save the current page contents to a file,…

This will take you less than 30 minutes with playwright and or puppeteer. A browser extension probably won’t work and would take at least 10x as long to write.

I've tried something similar using Selenium. It worked for a while but then started failing at a site that was using Cloudflare's CAPTCHA. If my browser was launched by Selenium it would end up in a seemingly endless CAPTCHA loop. It failed using both Chromium and Firefox.

I was able to get it working again for a while with some experimental option settings in the Chromium driver which apparently made it harder for a site to figure out that some sort of browser automation was in use, but maybe a couple months later that broke too.

I found a Chromium driver that was specifically made to not be detectable. That didn't help.

I just gave Puppeteer a try, with Chromium and Firefox, and they both got similar CAPTCHA loops.

With Playwright same thing with Chromium and Webkit. With Firefox, to my surprise, it actually worked. In fact I wasn't even shown the CAPTCHA. The checking for a human passed without requiring interaction.

So...looks like Playwright with Firefox might do the trick, but I'm a bit concerned about how reliable that would be long term.

That's one of the reasons I was thinking about an extension--most people using a site are going to have extensions so they aren't going to be able to use the existence of extensions as a sign that a visitor is a bot.

A lot fewer normal users of a site will be using web testing automation frameworks, and so if the site can detect those it might trigger anti-bot measures. I wonder if Cloudflare not being bothered by Playwright in Firefox is due to something Playwright is specifically doing to be undetectable, or just something Cloudflare hasn't gotten around to acting on yet? (I assume it is nothing Firefox specifically did, because of Firefox getting stuck in the CAPTCHA loop under Puppeteer and Selenium).

Re: For your next side project, make a browser extension

#265

Would recommend waiting a few weeks for Firefox to ship Manifest V3 because Chrome store isn't accepting new V2 extensions and Mozilla isn't yet accepting V3. Firefox MV3 is also a bit different, requiring some swapping / toggling that wasn't needed for MV2. Worth the pain though as extensions are like magic fairy dust for websites you otherwise cannot control.

Would sure be nice if FF was more timely about supporting MV3. The worst part is it looks like they won't be supporting service workers which is what Chrome decided to replace background pages with. Meanwhile devs are stuck maintaining two different versions.

Re: For your next side project, make a browser extension

#267

Earlier quoted context omitted.

The deprecation timelines have been postponed [1] [2]. You can still submit v2… but it’s probably best to build for v3 now. 1. https://developer.chrome.com/blog/more-mv2-transition/ 2. https://groups.google.com/a/chromium.org/g/chromium-extensio...

Last week I tried submitting an all new MV2 extension and Chrome Webstore said I had to use MV3. My older extension is still grandfathered in, so I was able to update the pre-existing. So it's awkward until Firefox MV3 is ready.

Wow, that’s… shocking to me. Thanks for the note!

Re: For your next side project, make a browser extension

#268

Earlier quoted context omitted.

The deprecation timelines have been postponed [1] [2]. You can still submit v2… but it’s probably best to build for v3 now. 1. https://developer.chrome.com/blog/more-mv2-transition/ 2. https://groups.google.com/a/chromium.org/g/chromium-extensio...

Only pre-existing MV2 extensions can be updated. New extensions have had to be MV3 for exactly 12 months already: since January 17th 2022.

Thanks for the note! I had no idea. And that makes it all the weirder that Google postponed things, especially because it seems the community is relying on Google to provide guidance on how to do a lot of things with MV3.

Re: For your next side project, make a browser extension

#269

Earlier quoted context omitted.

I agree. I think there really should be a separate extension store.

That would also help raise awareness for the fact that there are extensions in the first place. I've talked with many tech-savvy people who had no idea these even existed. It's like Apple wanted to make it possible to do extensions, but not remotely easy. And since they realized that this hassle would generate blowback if the general public went through the activation experience, they decided to keep it under wraps.…

That’s what I’m feeling, too… perhaps did they add extensions to iOS hoping they wouldn’t be too popular right away? Perhaps so they could watch what extensions get made, how they impact user experience, battery life, etc. ?

Re: For your next side project, make a browser extension

#270
post #254
post #243

Earlier quoted context omitted.

whats the point of using nextjs if youre not using ssr? wont CRA work fine?

Maybe they're wanting the image/font/script optimizations Next.js includes, or the other tooling it abstracts (e.g. SWC). You can use Next.js in full-SPA mode (e.g. next export) if you want. I would recommend that or Vite+React over CRA.

Do the image/font/script optimizations also work for SSG? I thought it was just for server side rendering. Also, does `next export` emit raw HMTL/CSS/JS or does it include React as the renderer as well? I seem to remember that `next export` could emit a build that (potentially) could work without JS as well, ie using React as purely a templating language rather than for logic.
Post reply on HN