19 ms·
For your next side project, make a browser extension
- hackrnusr 4y agoReading about all of the work that this developer went through to scale Twitter's walled garden makes me pine for the days of text-based Usenet news groups.
- 65 4y agoA 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 very specific filtering to LinkedIn job postings, and to track my application status. I do wish the Chrome extension API wasn't so annoying to use. Each time I make an extension I sort of dread the process since it's not a good developer experience, but I always find the result to be very useful in my day-to-day life.
- beambot 4y ago> I do wish the Chrome extension API wasn't so annoying to use. Each time I make an extension I sort of dread the process since it's not a good developer experience, but I always find the result to be very useful in my day-to-day life. Sounds like the making of a good lifestyle SaaS product.
- purplecats 4y agocan you elaborate?
- flappyeagle 4y agoI’d love to see how these things are architected. Do you have them on GitHub? Are there any boilerplates or anything you recommend to get started?
- paulryanrogers 4y agoMDN and Chrome does are mediocre yet do have reasonable starting points. Main bits are background vs content script(s), event listeners, and promises.
- Player6225 4y agoA long time ago, I put together this writeup of an extension I made. It's a bit old, and I rewrote the extension since, but the bones are still pretty similar: https://bpev.me/blog/favioli/ https://bpev.me/blog/favioli/
- PartiallyTyped 4y agoFWIW, HN has settings to limit how much time you spend here.
- 65 4y agoI do use it for other sites as well, like news sites. You can freeze any site for a specified period of time. It definitely makes me use the sites less frequently.
- shyn3 4y agoI love this idea of making your own. I wanted to create one that types the text I highlight like a type writer. Will have to try it now. Thanks.
- drowsspa 4y agoIsn't it easier to do those via User scripts?
- gernb 4y ago> Spend too much time on Hacker News? I made an extension to freeze the front page so it updates once every 6 hours. Me, I just open a guest account, or a new profile, etc. Meaning, the extension is at most a reminder to try to stop. it's still trivial to bypass
- selcuka 4y ago> the extension is at most a reminder to try to stop. it's still trivial to bypass Well, of course. You can also disable the extension, but that's not the point.
- bil7 4y agoI agree with who you're replying to. A blocker is no blocker if it is trivial to disable.
- johannes1234321 4y agoIt is about blocking yourself so the routine is interrupted. Suddenly it is no one click routine action anymore, but you take make the decision to bypass a conscious decision of the brain. At that point you can decide to stop and go back to your actual work and thus break the habit of ope ing that page too often.
- eyelidlessness 4y agoExecutive function tools: not an exact substitute for executive function capabilities. ;)
- literalAardvark 4y agoAll it needs to do is pattern interrupt strongly enough that you're not sucked into the social media black hole for hours. A bypass for 15 minutes button might be too weak, but a small math problem or a password you need to get from your manager would be enough friction. The decision to bypass after being interrupted is with you, and that's ok.
- throwaway675309 4y agoThere'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.
- fragmede 4y agoI 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.
- pictur 4y agoI don't know how the Firefox extension store is, but publishing the extensions in the chrome extension store was really torture. They unpublished a plugin I published years ago. When I contacted support later, they said it was removed by mistake and republished it. and this situation continued for 4 5 times. Finally, I said I can't deal with it and stopped caring. Does this kind of thing still happen?
- 0xCAP 4y agoYes
- nassimsoftware 4y agoIf I want to build a cross platform browser extension is there an easier way then having to write it twice?
- wongarsu 4y agoLast time I wrote an extension (which is a while ago) the changes between the Chrome and Firefox version were minimal. And Edge takes unmodified Chrome extensions. Obviously depends on the APIs you want, but a typical extension should be trivial to make compatible and package for both Chrome and Firefox.
- lab 4y agoThe Plasmo framework has a couple feature that you can use to specify bundle specific behavior at the compilation level (via env or via file): https://docs.plasmo.com/framework/workflows/build#with-a-specific-target https://docs.plasmo.com/framework/workflows/build#with-a-spe... Disclaimer: I'm the author and maintainer of the framework.
- insin 4y agoThis _was_ easy the last time I created a new extension, as Firefox also supports the `chrome` namespace for extension APIs, but now that Chrome Web Store isn't accepting new Manifest V2 extensions, you'll at the very least have to have separate manifest files for MV2 and MV3 versions, and different implementations where relevant for MV2 and MV3 (depending on which features your extension needs - e.g. if your extension is really just a way to inject a content script into a page, you might just need separate manifest files).
- vax425 4y agoI made one too! HTTPS://HeadlampTest.com
- 2h 4y agono dont. I would like to see less people doing browser extensions, and more people writing simple servers. so many companies offering free tier, it would be helpful for people to share who they chose and why, and for people to swap recommendations. extensions allow you to bypass the same-origin policy, but they dont give you the full power of a server. plus with a server, you can choose any language you want, you aren't locked into JavaScript like you are with an extension.
- redeux 4y agoHating on JS and suggesting people write servers aren’t very constructive suggestions. A browser extension is just a client, you can back it with the “full power” of a server if you want.
- 2h 4y ago[flagged]
- redeux 4y agoPlease keep Hacker News Guidelines[1] in mind when making your comments. Ad hominem attacks don’t bolster your argument and make this forum a worse place to have open discussions. [1] https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- 2h 4y agoYou might want to read them yourself before throwing the link around.
- kitsunesoba 4y agoOn top of the language/toolkit restrictions, I'm not a huge fan of writing browser extensions simply because of the limitations they pose compared to just about anything else… server side app, static SPA, electron, and native desktop/mobile are all so much more capable that when ideas spring up, those are the platforms they tend toward. I think though that if browser extensions broadly became capable of browser UI overhauls like Firefox extensions used to be, I'd be much much more interested. Most of the things I want to change about web browsing are in the browser, not the web, and making those changes by way of extension is far more practical than the nightmare of maintaining a browser fork.
- AlbertCory 4y agoThis is a plug for an extension I didn't write, and have no stake in: https://free.law/recap https://free.law/recap it's a browser extension that defeats the Pacer monopoly on (many) legal filings. If you do have Pacer and download something, it automatically uploads it to a free server. Thus, it becomes free to everyone else. I think some Big Law firms must use it, because a surprisingly large number of docs are available free. Legalities of this? They seem to be getting away with it.
- cldellow 4y ago> Legalities of this? They seem to be getting away with it. The US government runs PACER itself, they don't contract it to a profit-motivated third-party. [1] As a result, they're pretty lenient. At one point, their website said: "The information gathered from the PACER system is a matter of public record and may be reproduced without permission". So it's totally legal. The RECAP people also make it _really_ easy to ingest documents. For example, lawyers can add a RECAP email address as one of their default contact addresses with the court. Then all filings on any case that lawyer is involved in get automatically ingested when they are filed. [1]: Well, they outsource the administration to a third-party. But it seems more like a "we pay you, you keep the lights on", vs a public-private partnership where the third-party has a profit incentive based on the revenue of the service.
- AlbertCory 4y agoThanks, didn't know all that. I put in the "legalities" part mainly because I was thinking of a similar extension to defeat Elsevier & other vultures of scientific publication. Those people might be more litigious.
- cldellow 4y agoIt's good to be wary. My home province gave a private company a 50+ year monopoly on our land title records. I would _love_ something like RECAP for our land title records...but I suspect it's not possible to do it without violating the usage agreement that gets you the record in the first place.
- conqrr 4y agoChrome Extension Developer experience was the worst. A week of wait of approvals, Management of extension packages isn't great. Rejects on image formats etc. Firefox hasn't yet adopted Manifest V3 which is also a bummer. After all this, I still managed to put up Selaro which is a workplace links organizer: https://getselaro.com https://getselaro.com
- tech234a 4y agoManifest V3 support is coming to Firefox on Tuesday with the release of Firefox 109.
- cpeterso 4y agoFor more details, see Mozilla’s November announcement about MV3 in Firefox 109: https://blog.mozilla.org/addons/2022/11/17/manifest-v3-signing-available-november-21-on-firefox-nightly/ https://blog.mozilla.org/addons/2022/11/17/manifest-v3-signi...
- andy_ppp 4y agoI was thinking about building a browser extension that allowed me to tag videos on YouTube and using AI figure out if I would like to hate new videos and mark them as such (interesting, exceptional, funny, not interested, spam, time waster etc.). Maybe it could rewrite clickbait headlines too. Eventually it could completely edit all the rubbish out of YouTube videos based on my likes and be a kind of personal assistant to help to avoid mindlessly watching things that aren't good for me...
- nubinetwork 4y agoThis sounds great and all, but I've seen so many instances of good extensions giving up when the browsers decide to make your extension unusable... IE Firefox deprecating NPAPI, google trying to force manifest v3, etc etc.
- iambateman 4y agoTo extend the idea a bit…iOS shortcuts should be considered “extensions” by the same token. They’re incredibly easy to make and can create a lot of value, plus they’re shareable. As an example…I built https://SimplifyRecipe.com/shortcut https://SimplifyRecipe.com/shortcut in a couple hours and it’s been extremely useful for getting rid of the life story on recipe pages. Lots of people connected with that concept, so now I’m working on building a full-fledged app.
- duncan-donuts 4y agoI just forwarded this off to my wife because we joke about how bad most recipes are with elaborate backstories. This is a product that I really want while also solving a problem that doesn’t quite meet the threshold for me to actually do something about it. Stumbling upon it randomly was a good way for me to adopt it tho so there’s that.
- iambateman 4y agoRight on, thanks! I hope it works well for her. There’s still lots more work to do to get it fully working but we will get there! Really appreciate it.
- redeux 4y agoThis is really useful shortcut, thanks for sharing! Do you have any good resources for getting started with iOS shortcut apps like this?
- iambateman 4y agoThanks! I’m happy to answer questions if you have any: Stephen at bate-man.com. It’s a bit of a Wild West right now so there are very few resources. I just started building a couple tools using the shortcuts app (it comes with a builder GUI). The system is more powerful than it looks. You can pull HTML from pages, grab all the links, do for each loops, if statements, variables, etc. the biggest drawbacks are (1) the UI in the shortcuts app is targeted at non-developers and (2) not all features are supported on older devices and (3) you can’t issue “updates”, so once you share a shortcut it’s just out there and (4) people don’t usually have context for what a shortcut is. But in exchange you get instant, one-click install without an approval process. It’s pretty cool!
- fswd 4y agoAny suggestions for a good stack to develop extensions? I'm coming from nodejs/react, and would like to stay close to that. Is there an up-to-date stack I can clone, copy, and deploy with something like 'yarn run build' and start hacking?
- satvikpendem 4y agoI've used NextJS for browser extensions, works well. There are templates on GitHub but to be honest it isn't that hard to package into a browser extension.
- no_wizard 4y agoBiggest thing is just packaging it as a static site without SSR correct?
- satvikpendem 4y agoCorrect.
- swyx 4y agowhats the point of using nextjs if youre not using ssr? wont CRA work fine?
- leerob 4y agoMaybe 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.
- satvikpendem 4y agoDo 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.
- nickjj 4y agoIf someone is looking for ideas, I'd love an extension that shows if a png image is really transparent instead of being a png or jpg with literal checker box patterns on the image. I tweeted about this once a while back[0], it gained some traction but never materialized. This would save a lot of time trying to find transparent images that turn out to be fake. These types of sites are worse than the "fake" github issue tracker sites. [0]: https://twitter.com/nickjanetakis/status/1545876124865101826 https://twitter.com/nickjanetakis/status/1545876124865101826
- mrbombastic 4y agoHmmm the checkered background actually seems distinct enough that it wouldn’t be too difficult to automate its removal and just create a png with a transparent background.
- nickjj 4y ago> Hmmm the checkered background actually seems distinct enough that it wouldn’t be too difficult to automate its removal and just create a png with a transparent background. You can do this with some image editors and a "magic wand" but you typically end up with jagged edges unless the shape is basic or you have specialized tools that can auto-feather them in a natural way. I think with a bit of code you could check if the image type is png and it hasn't been flattened then overlay a little icon that says it's really transparent when you activate the browser extension. Although I did just discover an interesting trick[0]. If you goto let's say images.google.com and search for something, you can tell right away if it's transparent or not by selecting the image and dragging it to anywhere on the page. If it shows the checker boxes while dragging then it's not transparent. My life is complete now. [0]: https://www.youtube.com/watch?v=G3Y5PcuH23Y&t=173s https://www.youtube.com/watch?v=G3Y5PcuH23Y&t=173s
- quickthrower2 4y agoI was caught out by this today. My use case is I downloaded an image and realized it was mostly transparent and relied on a certain colour background to show properly. I ended up using the snippet tool in Windows instead to get the image, which was OK for my use case (taking some notes). In addition, one annoying thing is "save image as" seems to only work on image tags, not images that come from CSS. So I think some kind of image tool that handles these kinds of issues, including the "is transparent" would be quite cool.
- bariumbitmap 4y agoBrowser extensions are useful. I've made some simple ones and published a few: https://addons.mozilla.org/en-US/firefox/user/14310707/ https://addons.mozilla.org/en-US/firefox/user/14310707/ But it's also worth considering where the browser gives priority. For example, while browser extensions can add custom keyboard shortcuts, they can't override the keybindings a website uses. Want to use the keyboard shortcut Ctrl-Shift-1 for a browser extension while a Google Docs page is focused? Nope, sorry, can't be done. https://github.com/gsomoza/firefox-easy-container-shortcuts/issues/13 https://github.com/gsomoza/firefox-easy-container-shortcuts/... It's pretty clear that while a browser extension can access browser APIs that a web app can't, the extension is still a second-class citizen in other respects.
- purplecats 4y agothere are several ways to get around this, including natively via chrome://extensions/shortcuts
- satvikpendem 4y agoPSA: 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...
- tommywg7 4y agoMade one recently to put Google's trending page in an extension! Loved how quick you can build and release something usable. Check it out https://chrome.google.com/webstore/detail/trending-google-searches/ggpomgobocmlpmnlcaokmlepabjfmjbg https://chrome.google.com/webstore/detail/trending-google-se...
- Animats 4y agoNo, 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.
- satvikpendem 4y agoInteresting, based on browser share I'd have expected 90% to be on Chrome instead. What's the extension (or rather, why are most on Firefox)?
- Animats 4y agoBecause Firefox users install more extensions than Chrome users do. Or at least they used to. I don't really care; it's an old project I keep going for existing users.
- boltzmann-brain 4y agowhat is it?
- gnicholas 4y agoI've had an extension on Firefox and Chrome for almost a decade. Chrome is 90% of our users. It's possible that FF users are more likely to install, as mentioned above, but that doesn't outweigh the sheer number of people on Chrome. With the manifest v3 update, we're changing our freemium structure, and updating our docs. But since FF hasn't figured out all of their manifest v3 stuff, we're not able to update for that 10% of users. It's going to be confusing because our marketing material will reference the new freemium model. But it's no contest as to what we should primarily reference, since there are so few people on FF by comparison to Chrome.
- lvass 4y agoUse tampermonkey if possible. Or better yet, extend software that doesn't break, like Emacs.
- dom96 4y agoFunny to see this. I recently worked on a browser extension[0] to expand Twitter.com's functionality as well, specifically to connect it to Mastodon and show Mastodon posts amongst ordinary tweets. It was a lot of fun to build this, though dealing with the oddities of Chrome was frustrating at times. Especially when it comes to permission granularity. [0] - https://chrome.google.com/webstore/detail/mastodon-chirper/lgiffpmohlpjlkclpmelkkfmjnlpafne?hl=en-GB&authuser=0 https://chrome.google.com/webstore/detail/mastodon-chirper/l...
- sfifs 4y agoI believed in stuff built on top of browser platform too and had written something useful for me and it turns out a few dozen more people through the Chrome store. Then Google for some ideological reason related to PWAs killed the Chrome Apps platform and all of a sudden, a great way to distribute functionality just disappeared. https://blog.chromium.org/2020/01/moving-forward-from-chrome-apps.html?m=1 https://blog.chromium.org/2020/01/moving-forward-from-chrome... Apparently it is now alive-ish (there seem to be a set of follow up announcements) but was burnt.
- Alifatisk 4y agoI try to stay away from browser extensions as much as I can, it will only bloat my browser even further. Firefox + Tampermonkey should be enough in my case. Is there anything a browser extension can do that Tampermonkey cannot?
- mmahemoff 4y agoTampermonkey can change what's on the web page, but extensions can do much more than that, e.g. add toolbar menus and items to the context menu, add keyboard shortcuts, manage bookmarks, and so on. (See the API guide for an overview [1]) It's true that many extensions could "just be" Tampermonkey scripts. I'd guess they ship as standalone extensions due to a combination of: less friction to install, more discoverable, can extend with fancier features later on, and probably just inertia/ignorance from developers unaware of Tampermonkey. 1. https://developer.chrome.com/docs/extensions/reference/ https://developer.chrome.com/docs/extensions/reference/
- ge96 4y agoA friend of mine uses this extension that tracks emails. It injects a pixel it made remotely into the email body. That sketches me out so much ha. But yeah I have made a few extensions myself since I spend a lot of time in Chrome. If they go ahead with the anti-adblock I will have to learn Firefox's extension.
- kshay 4y agoRight, for the average user the barrier to entry for userscripts is significantly higher than for extensions. I recently released one (a small enhancement to the Netflix UI) in both forms for this reason: https://greasyfork.org/en/scripts/446689-netflix-recommendation-explorer https://greasyfork.org/en/scripts/446689-netflix-recommendat..., https://chrome.google.com/webstore/detail/netflix-recommendation-ex/lcbnogjjkahcjhdnaknpkccfgbobmcie https://chrome.google.com/webstore/detail/netflix-recommenda...
- AgrMohit 4y agoAs for keyboard shortcuts, userscripts can do that by observing individual key presses. I personally use a tiny library [0] by the Violentmonkey team to do it which is easy to use and smooths out differences between platforms and browser implementations. While userscripts can't add items to toolbar or context menus, you can register menu commands [1] which have the added benefit of being able to be added dynamically after examining page contents. This is done using the `GM_registerMenuCommand` api [2]. [0]: https://violentmonkey.github.io/guide/keyboard-shortcuts https://violentmonkey.github.io/guide/keyboard-shortcuts [1]: https://imgur.com/a/SWpOoRS https://imgur.com/a/SWpOoRS [2]: https://violentmonkey.github.io/api/gm/#gm_registermenucommand https://violentmonkey.github.io/api/gm/#gm_registermenucomma...
- stuaxo 4y agoThis looks great, though extensions being sold has a history of going badly for the users, is it safe to install this now it's owned by Tweethuntet who seem big on "monetisation" ?
- tzs 4y agoI 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, then navigate to each link on the page that doesn't go offsite and save those pages, and so on to a specified depth. (Why not just use wget itself from my terminal? Because the pages I was interested in have JavaScript that modifies the DOM, and it is that modified DOM I want).
- geraldwhen 4y agoThis 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.
- tzs 4y agoI'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).
- HenrikB 4y agoIt's been many months since I tried, but I think you have to redo thateach time you restart Firefox, i.e. contrary to Chrome, you cannot make it persistent.
- sum1ren 4y agoExtensions were the only way to help me fix my habit of constantly rebrowsing websites. It was chronic at one point. Might come in helpful for someone: Https://fetcher.page
- Benjammer 4y agoIf you don't want to actually write the code and deal with the browser webstores, you can also use an "extension builder" tool like https://www.pixiebrix.com/ https://www.pixiebrix.com/ to call APIs, move data around, and build simple UIs.
- Glench 4y agoI wrote something similar about extensions being a good starting place for indie hackers that are trying to make money. Many of the same conclusions as the author of the article — low barrier to creating, can sometimes grow and be useful for a lot of people with no scaling issues: https://www.indiehackers.com/post/why-browser-extensions-are-a-good-way-to-start-indie-hacking-d534627540 https://www.indiehackers.com/post/why-browser-extensions-are... Also, I run a service that lets extension developers take payments in their extensions and it's been really cool to see many extensions take off like the author describes.
- Glench 4y agoAlso, I'd love to hear other extensions people have made in the same vein the author talks about — things that get on their nerves so they did something about it. Here are mine: - Remove Floating Banners: A button that gets rid of all `position: fixed` elements on a page to give you more reading room. https://chrome.google.com/webstore/detail/remove-floating-banners/eikiknenphpghfaeoiccingnjmjeieml https://chrome.google.com/webstore/detail/remove-floating-ba... - Autodelete History by Keywords: Remove history / download entries for keywords or URLs automatically as you browse. https://chrome.google.com/webstore/detail/autodelete-history-by-key/polggcnmaapkikfinkghdnjobnemolim?hl=en&authuser=0 https://chrome.google.com/webstore/detail/autodelete-history... — Auto Scroll Search: Lets you CTRL-f search infinitely scrolling web pages. https://chrome.google.com/webstore/detail/auto-scroll-search-scroll/ieceeinfkigfaeoomfimmecebngempef?hl=en&authuser=0 https://chrome.google.com/webstore/detail/auto-scroll-search...
- toyg 4y ago> , I run a service that lets extension developers take payments in their extensions Link? Edit: nvm, found it https://extensionpay.com/ https://extensionpay.com/
- alexnewman 4y agoCurious if people have done a lot of iOS safari extensions. Seems like a new api
- ajolly 4y agoCreating and modifying browser extensions have been one of the most useful quality of life utilities ive written. I'm dreading the switch to V3, I'll have to figure out what I can port over and how to do so :/
- revskill 4y agoAgree. One of usecase, is to let user select the "theme" for the project by just installing theme extension.
- deleted 4y ago[deleted]
- cookingrobot 4y agoAre browser extensions safe? My understanding is they generally get access to everything you browse, and are too big a security risk for a work machine. Is it as bad as I think?
- selcuka 4y ago> they generally get access to everything you browse They don't have to. Extensions declare which sites they want access to in the manifest file. Many extensions and user scripts only get access to specific sites.
- forgotusername6 4y agoIt is fairly trivial to audit the code to see what the extension is actually doing.
- pwdisswordfish9 4y agoThey are approximately as big of a risk as any other third-party code you install from the Web onto your machine (e.g. tools from dev SDKs).
- tectonic 4y agoI have a personal browser extension that I use as a grab bag of assorted tools and fixes for sites that annoy me. It's half way between a userscript, a bookmarklet directory, and a UNIX shell, with little commands that run automatically on certain sites or operate on the DOM, and can pipe output to other commands. Here's a very old video of it in action: https://vimeo.com/118090094 https://vimeo.com/118090094 (It's no longer open source because I don't want to have to maintain it for other people.)
- caseyw 4y agoThat’s a very cool piece of tech right there. Has in evolved much since then?
- tectonic 4y agoMostly with a bunch of handy quick tools that in the past I would have put in bookmarklets.
- purplecats 4y agooh cool ive built my own version of this from scratch; didn't know others did this too
- abdullah2993 4y agoThe real question is how much money did the OP made?
- deleted 4y ago[deleted]
- lvh 4y agoThe 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.
- EGreg 4y agoI’ll say even more. Build an iOS Safari extension. There is a good rush now
- mfrisbie 4y agoI was enthusiastic enough about extensions that I decided to publish a book about building them: https://www.buildingbrowserextensions.com/ https://www.buildingbrowserextensions.com/ Browser extensions are severely underrated as a platform because they aren't sexy. For all that mobile devices have given us, so much of our work continues to be done using a desktop browser. Enhancements such as augmenting websites with widgets, supplying contextual information, and automating repetitive tasks using the authenticated session - when applied appropriately - can save someone hours every day.
- toastal 4y agoFx on Android allow add-ons. I've used them for years.
- mfrisbie 4y agoI'm a faithful Firefox Mobile user myself, it's the easiest way to use an adblocker on a mobile device. I don't think it's controversial to suggest that extensions are a desktop-first platform: things like popups, omnibox API, contextmenu API, or customizing developer tools either aren't applicable in a mobile format or don't translate very well.
- abdusco 4y agoAlso Kiwi Browser. It's a Chromium fork with extension + adblock support, it even has a developer console.
- Hitton 4y agoBut the UI is rather klunky. Example is using uBlock Origin to block random element on page. You must: 1) click kebab menu icon 2) scroll all the way down 3) click ublock icon 4) on another screen click "enter element picker mode" 5) that takes you to the rightmost opened tab (!), so most likely completely different tab than you were using, so you must switch back to your original tab 6) you can finally pick elements Still, considering that only alternative is Firefox which makes you go to different screen just to switch tab and jump through hoops to be even able to download most extensions, it's still the best Android browser.
- daveed 4y agoI spent some time some productivity extensions, for gmail replies[0] and quick notetaking[1]. It was a lot of fun, but like other people have mentioned, porting to and working with manifest v3 is not as nice. I've noticed also that the way Google asks for permissions from the user is done in human-understandable, but worst-case language. For example, I think there was something where I wanted access to the current tab, so I could inject an overlay. I think a friend told me during installation that I was asking to see their history and browsing data. Which is true - knowing what page they're on does let you recreate their browsing history... but when presented to the user like that, it makes it seem like tracking history is the primary thing the extension does? Anyway, frustrating. [0] https://chrome.google.com/webstore/detail/akndolpagcjaolannkpophkacklomagp https://chrome.google.com/webstore/detail/akndolpagcjaolannk... [1] https://chrome.google.com/webstore/detail/icdbglcdnjonofjpcfpcgpjjchokgnjl https://chrome.google.com/webstore/detail/icdbglcdnjonofjpcf...
- qwertox 4y agoI know this hurts as a developer, but using this language is just a way of being sincere to the user.
- strken 4y agoAs a user it's not that helpful when extensions which inject stuff into the page (lots of them) all say they can access your history and browsing data. Even though it's actually true, it feels like a gap in the permissions model.
- techdragon 4y agoThe problem is the gap is a mile wide. If you can see the current page url, you can see the next page URL and thus one page at a time you have the users browsing “history” from the moment they installed the extension, if you can run arbitrary JavaScript then you can check the back URL, you could potentially add some scope related restrictions to what injected JavaScript can do based on the permissions of the injecting extension but that still doesn’t stop the sort of “one page at a time discovery” of your private information and/or browser history.
- qwertox 4y agoIt's not a quick hack for a personal project. You have to sign up to the Chrome Web Store Developer Dashboard and agree to all the terms and conditions, semi-publish the extension to a limited group of people (probably only yourself), and AFAIK you need to be logged in as one of the group members in order to be able to then see the webstore page of the extension and install it. In order to update a small issue you need to submit a new version and wait for approval and hope that your account doesn't get flagged because you're using the extension to store all your (tab-)history into a custom database.
- CodexArcana 4y agoIf your intentions are to only use the extension for yourself, why not just side load it?
- weaksauce 4y agoside loaded extensions are not persisted every restart of the browser.
- paulryanrogers 4y agoChrome does keep side loaded extensions through restarts. Firefox doesn't unless you submit to Mozilla for signing. But once signed you can install from a file or even your own site.
- weaksauce 4y agoI use firefox mainly and thought it was common behavior between the two
- paulryanrogers 4y agoMozilla's signing process isn't too bad, especially if your addon changes infrequently. Recommend trying it.
- thisismyswamp 4y agoI guess Honey is a good example of a browser extension that went on to turn into a successful business.
- paulryanrogers 4y agoWould 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.
- karmelapple 4y agoThe 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/ https://developer.chrome.com/blog/more-mv2-transition/ 2. https://groups.google.com/a/chromium.org/g/chromium-extensions/c/zQ77HkGmK9E https://groups.google.com/a/chromium.org/g/chromium-extensio...
- paulryanrogers 4y agoLast 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.
- karmelapple 4y agoWow, that’s… shocking to me. Thanks for the note!
- fregante 4y agoOnly pre-existing MV2 extensions can be updated. New extensions have had to be MV3 for exactly 12 months already: since January 17th 2022.
- karmelapple 4y agoThanks 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.
- tppiotrowski 4y agoIt's also a good way of interviewing. As part of your cover letter, explain that you decided to improve the website of your future employer in some way and give a link to the extension. Someone I interviewed once did something like this and we couldn't think of a reason not to hire them because they effectively showed us they were capable of understanding and modifying our existing code which was basically what we wanted in a candidate.
- scruple 4y agoThat's interesting. I have a browser extension on my GitHub that added IMDB, Rotten Tomatoes, etc., ratings and access to reviews to streaming services that I subscribe to. I doubt that could've been the basis of getting a job at those places but it was a fun project, regardless, and I got value of of it while I was using it. No idea if it still works, but I assume not
- peterhil 4y agoI have already made one browser extension for easily adding bookmarks into the category (folder) you want to, or create a new subcategory while adding a bookmark. Try it out! peterhil/spellbook: Spellbook is a bookmark extension for Chrome and Firefox https://github.com/peterhil/spellbook https://github.com/peterhil/spellbook
- dmak 4y agoDo you have a demo?
- llanowarelves 4y agoAwesome, this is exactly the kind of thing I was looking for. Will try it out later. I have a highly organized folder structure and this could be easier than finding it in the native treenav view. Now I just need good ways to add and search tags, make offline copies (index.html+PDF), and maybe even search the contents of the pages and I'll be golden.
- anothernewdude 4y agoI've already made a few browser extensions, and I must say, it's a much bigger pain in the ass these days. Getting signing working, or disabling in browser is a terrible process, that I'm not going to do for a side project.
- Ozzie_osman 4y agoPeople who are complaining about writing Chrome extensions now, clearly didn't write them early on. It's still not as easy as it needs to be, but back in the day they were extremely difficult to develop/debug.
- Sujeto 4y agoYep, I ditched tabs from firefox altogether. Now use my own sidebar extension. https://addons.mozilla.org/en-US/firefox/addon/grasshopper-urls/ https://addons.mozilla.org/en-US/firefox/addon/grasshopper-u...
- minikomi 4y agoI did this a while back, wanted a bpm tapper which was always available in chrome. Super useful when browsing eg. youtube or soundcloud for tracks to add to a dj set https://chrome.google.com/webstore/detail/tap-bpm/gfagkcalolmjecefbofbdaemfcefipnc https://chrome.google.com/webstore/detail/tap-bpm/gfagkcalol...
- TimLeland 4y agoIm a big fan of browser extensions as well. They are great side projects that can grow to hundreds of thousands of users. They can be as simple as html and javascript. My most popular extension is a url shortener tool and its grown to over 400k users https://t.ly/extension https://t.ly/extension
- sb8244 4y agoMy favorite chrome extension pattern is state stored in background page that's communicated with injected content scripts via redux + actions. You get a crazy powerful state management model that can allow traditional web pages to feel like SPA (your extension around it at least) It's a shame manifest v3 absolutely butchers this use case because there's no long term live-state management other than opening an extension tab.
- fregante 4y agoLook into chrome.storage.session, they created it explicitly to allow in-memory storage for those scenarios. Not as easy as just setting a property, but good enough.
- sb8244 4y agoI'd be curious about latency for frequent access and the 1MB quota. I think that may make it a similar solution on the surface, but fairly limited in usage. I was powering a fairly large amount of state, to the point we had to diff state changes due to browser message costs. It was difficult to write, but was incredibly powerful.
- l0b0 4y agoI developed one a few years ago, TDD and all. Automating browser testing was surprisingly difficult, and required working around some gaff to get it going at all. Nobody else seemed to be doing it, either, which was surprising. Last I checked it didn't seem any better, so I'm not too keen to do any more. At least the extension has continued working for many years with minimal upkeep.
- monkpit 4y agoI haven’t looked in years but last time I checked there was a real lack of any well-documented guides of how to get things going. I managed just by trial and error but I would hardly call it fun, it left me wondering how anyone makes any complex extensions without going insane. Maybe there’s a missing manual somewhere that I just couldn’t find, but it all just seemed pretty annoying/painful. Tooling and debugging experience was really lacking. EDIT: This is specifically regarding chrome extensions.
- jerrygoyal 4y agoI built 3 chrome extensions for fun: Notion Boost - 50k+ users , made 3000$ so far https://github.com/GorvGoyl/Notion-Boost-browser-extension/ https://github.com/GorvGoyl/Notion-Boost-browser-extension/ ChatGPT Writer - 20k+ users within 3 weeks of launch https://chatgptwriter.ai https://chatgptwriter.ai: Gimme Summary AI - just launched https://gimmesummary.ai https://gimmesummary.ai
- koolba 4y ago> ChatGPT Writer - 20k+ users within 3 weeks of launch So this plugin sends the contents of the user’s email to ChatGPT? I understand that it’s clearly opt-in as the user is installing the plugin, but what the heck?
- johtso 4y agoWait until you see the people using ChatGPT as their own personal therapist..
- Zuiii 4y agoUnless I can write and distribute extensions without signing a legal agreement or having to involve a thirdparty gatekeeper, I'd rather not.
- paulryanrogers 4y agoChrome allows permanent side loading for users in dev mode. Firefox requires at least uploading to Mozilla for signing and some sanity checks, then you can side load or self host them.
- Zuiii 4y ago> Firefox requires at least uploading to Mozilla ... which requires I sign a legal document and involve a thirdparty gatekeeper. Chrome is practically the same; I'm not going to ask my users to go mess with their browsers' settings assuming they can even do so (policies). Life is too short to deal with the nonsense of hostile platforms.
- LikeBeans 4y agoI used the Opera browser for a while then moved to Firefox. One functionality I really missed was the little popup you get when you highlight some text. The popup would let you web search for whatever is highlighted for example. Anyway now on Firefox I made an extension that can do the same thing but then extended it further. At a basic level you can copy to clipboard, do a web search but also can do a Google Maps lookup too. Often I'm reading a page and I come across some location like a city name or some place around the world or a GPS coordinate. Or something I want to research further. Now I just highlight it then select the appropriate action from the menu that popups up. Through the settings menu you can extend it further and add your own search. Side note: For web search you can search using whatever search engine you want. Just change the string in the settings menu. Here's the Firefox version: https://addons.mozilla.org/en-US/firefox/addon/popup-tooltip/ https://addons.mozilla.org/en-US/firefox/addon/popup-tooltip... And the Chrome version (yeah had to learn Manifest v3 to port): https://chrome.google.com/webstore/detail/popup-tooltip/opbiebgbaablkfhomifdkhjdbilobbdg?hl=en-US https://chrome.google.com/webstore/detail/popup-tooltip/opbi... I use this often and made it for myself... but maybe others find it useful too.
- davidbarker 4y agoIf you're on a Mac, I highly recommend PopClip (https://pilotmoon.com/popclip/ https://pilotmoon.com/popclip/). It works on any text you can select — across the whole OS. It's also context aware (so it knows if you're selecting a URL vs. regular text, for example). There are plenty of plugins already available, but it's also possible to create your own very easily. I had a quick Google and it seems there are similar apps available for Windows, but I don't know anything about them.
- dvhh 4y agoFrom a personal experience, some of the extensions I built were for enhancing productivity for internal tool (with a good amount of userscripts and userstyle ) to reduce the amount of paper cuts in my use case and shared with multiple team with positive feedback before escalating to management so I could get in touch with the team in charge of the tool and suggest the enhancements.
- gnicholas 4y ago> I had a strict rule for this project: no operational stress. This meant no servers, and no data storage. Building for someone else's app/extension store always carries some risk, and therefore operational stress. In addition to the manifest v3 concerns others have raised, there are also the random takedown notices (that arrive with zero notice, and for zero reason). It may be easy to get started building an extension, but it's certainly not without operational risk.
- chrismsimpson 4y agoNo, as a side project, make a browser and free yourself from the browser monopoly.
- wankle 4y agoChrome Extensions could be written in Java using a transpiler like this one to transpile to JavaScript: https://www.jsweet.org/ https://www.jsweet.org/
- rounakdatta 4y agoWell, shameless plug, but I made something similar: https://github.com/rounakdatta/twitter-profile-search https://github.com/rounakdatta/twitter-profile-search :)
- memonkey 4y agoI want to make a StumbleUpon clone again.
- fareesh 4y agoIf the project is for non-technical folks, is there sufficient awareness about how to use extensions at this stage? Also no mobile seems like a big deal
- wonderfuly 4y agoAs the author of a popular extension [1] (400k users), I don't think Chrome extension is a good platform: 1. The review process is unstable and frustrating, sometimes it passes in 10 mins, sometimes it takes over ten days, it's painful if you're releasing some emergent bug fixes. 2. No support for monetization at all, Google Adsense are not allowed in browser extensions, no native payment support in the platform. [1] https://chatgpt4google.com https://chatgpt4google.com
- furrowedbrow 4y agoHow are people monetizing Chrome extensions? I was under the impression you couldn’t do subscriptions anymore (without bringing in a third party) but you could still charge a one-time purchase fee from the Chrome App Store, is that not the case?
- swyx 4y agosee how tweethunter does it. free to play, then login with paid account for more features
- fractalf 4y agoCheck! I made a "wrapper" of the amazing JSON Editor Online: https://addons.mozilla.org/en-US/firefox/addon/json-editor-ex/ https://addons.mozilla.org/en-US/firefox/addon/json-editor-e...
- amelius 4y agoNot sure if things have changed lately but as a user, I try to avoid browser extensions because they seem to be very insecure.
- kilroy123 4y agoI agree the the less the better but if it's your extension I think it's fine.
- llanowarelves 4y agoImo, they definitely need more fine-grained permissions. (See other comments in this thread about that).
- wildpeaks 4y agoLast time I was making one (for myself, not to publish), my main issue was that browsers made it nearly unusable to have a private local extension because you only had two choices: - either upload it on their website and go through approval everytime - either lower security to run in developer mode, and have an alert warning you about it every X minutes, ruining your focus VSCode on the other hand has no issue running local extensions at the same time as extensions from the marketplace.
- kevincox 4y agoThis is very intentional because it is common for malware to install browser extensions. It would be nice to have a way to opt-out but this is probably hard to do without also making it too easy for the malware to opt-out for you.
- Farow 4y agoAMO does not require a manual review nor the extension to be uploaded publicly. You can sign it through their site and then distribute it elsewhere. Also, I don't see how you can compare browser extensions to vscode extensions. One product is aimed at your grandma, the other at software developers and doesn't have access to your email, banking and credit cards.
- whiskeymikey 4y agoWhat’s AMO?
- Farow 4y agoaddons.mozilla.org
- dekervin 4y agoIt seems the Perfect place to plug a chrome extension I (half-assed) hacked together. https://datum.alwaysdata.net/static/extension/index.html https://datum.alwaysdata.net/static/extension/index.html It crowdsources tags for hacker news threads. And it also adds contextual and relevant real world data while you browse a HN thread. It's a companion extension for the website https://datum.alwaysdata.net https://datum.alwaysdata.net . I want to grow my tester community.. don't be shy ! You can access the code !
- seba_dos1 4y ago> making an extension is a fun and efficient way to create useful software, especially when you can only invest limited time and effort. Instead of starting from a blank slate, you can start by tailoring some piece of existing software to better serve your own needs ...and a quick way to get burned out due to churn from incompatible changes (either from websites or browsers) breaking your project. What you're looking for may be modifying an existing Free Software project you use instead, which is something I wholeheartedly recommend. There's often a high chance that you'll be able to upstream your changes, making it better for everyone and taking ongoing maintenance out of your shoulders - unless you actually want to maintain it as your own, which is also something you're free to do.
- insin 4y agoI love the section on "Earning the pixels", as this is something I also put a lot of time into in extensions, from the target site itself to the options page in my extensions having per-browser CSS to make sure it fits in with the browser's own options UI (and in light and dark mode). With Twitter, earning the pixels in the site UI is even more fraught as it's a React Native for Web app, so you really don't want to touch the app's own DOM directly, as it will most likely get wiped out on the next render. e.g. The latest version of Tweak New Twitter [0] keeps you on the "Following" timeline, gets rids of the new "For you" tab and adds a new "Retweets" tab - to highlight the Retweets tab as active when the user clicks it, I had to add a styling hook class to <body> and use that to manually style the Retweet tab as active and override styles for existing tabs to make them display as inactive. Another layer of fun: at any point the user can change the Default/Dim/Lights out theme and the highlight colour using the Display dialogue, so I needed to figure out how to detect these changes, figure out what was now being used and re-apply them to custom UI on the fly. [0] https://github.com/insin/tweak-new-twitter#tweak-new-twitter https://github.com/insin/tweak-new-twitter#tweak-new-twitter
- thoew232s 4y agoFor how much this was sold?
- dandare 4y agoWhenever you hear abou SA you should remember https://en.m.wikipedia.org/wiki/William_Sampson_(author) https://en.m.wikipedia.org/wiki/William_Sampson_(author). He was tortured so badly in SA that even reading about it will give you nightmares.
- chan-dev 4y agoIs there any communities such as slack or discord channels specifically focused on browser extensions development? It seems hard to find.
- mustak_im 4y agoThis post inspired me to hack together an extension for a side project I’ve built a while ago and almost forgot about it. https://addons.mozilla.org/addon/hacker-news-preview/ https://addons.mozilla.org/addon/hacker-news-preview/