Hello HN!

I wrote a browser extension (also available as a userscript) that allows to insert quotes into site's reply message box using selected text + hitting 'r' (as it's done on Github). It targets only specific sites (basecamp.com, slack.com), because that's what we use at our company daily.

The idea came out of my boss (who's also a good friend of mine) frustration. He always complained that Basecamp's replies are so inconvenient compared to Github's way. You have to select the quote, copy it into clipboard, then scroll to the reply box, paste it, then select the text again, and finally format it as a quote using editor's toolbar. That's 6 steps vs 2 on Github!

Last summer Basecamp rolled out a new facelift featuring a heavy usage of keyboard shortcuts. But "reply with r" was still missing, so another rant from my boss followed :)

At that time I was toying with an old browser extension written long time ago as a learning project. I was rewriting it against the new extension API to see what changed/improved. Being immersed into the topic, it was obvious that a thought about "fixing" Basecamp with a browser extension came into my head.

So I started working on the Dial R for Reply project during my spare time. I had two clear motivations: 1. I knew it would make someone's life better (myself included). 2. I would learn something new along the way.

During the process I realised I could also "fix" Slack replies. It was a bit of trial and error (I didn't use any LLMs for reasons stated above). The hardest part was to dig into each editor's public and private APIs (Basecamp uses lexical, Slack uses Quill). I had to resort to using internals, so be warned -- it might break when site owners decided to update those libraries. On the other hand, hacking a site with an extension is a risky operation anyway (anything may be changed at any time).

Key takeaways:

1. browser extensions are cool! Compared to native apps and electron wrappers, you as a customer have such a powerful tool to amend a web application as you like. 2. if you are a library writer, if possible, keep your private state and/or functions accessible to the outside world. Yes, you should clearly mark them as a private, so there's a clear boundary drawn between what can be used safely and what's not. But being able to peek into private state was the only option for me to debug and hack into the application.


Comments URL: https://news.ycombinator.com/item?id=50383827

Points: 1

# Comments: 0