I made a programming.dev Firefox extension, but could use some help/feedback
from kn0wmad1c@programming.dev to programming@programming.dev on 19 Aug 2024 23:48
https://programming.dev/post/18342711

Hey all, I made a Firefox extension (signed by Mozilla) specifically to add Show/Hide Child Comments functionality similar to how RES had it (where the parent comment is still visible).

It’s not very useful, but I could use some feedback on tightening up the Javascript. I’m not a JS beginner, but I know I can do better, so any tips are welcome!

EDIT: Also, if anyone has any suggestions for the extension, I’m open to those as well.

#programming

threaded - newest

cyberic@discuss.tchncs.de on 20 Aug 2024 00:31 next collapse

I really miss the RES feature of keyboard navigation (mainly j, k, to move between posts.) Thanks for making this!

kn0wmad1c@programming.dev on 20 Aug 2024 00:55 next collapse

Should be pretty simple to add something like that as well. Thanks for the suggestion!

towerful@programming.dev on 20 Aug 2024 18:38 collapse

I haven’t tried this yet, but I’m excited for it’s potential.
Having a bunch of RES-like enhancements with toggles, and the ability for users to (manually & anonymously, via a button) “submit” their preferences to a central database would be an awesome way to gather Lemmy user feedback on various upcoming features.
This would give fantastic options for Lemmy developers to implement, popularity of features, and easy ways for users to choose what they want (as long as any permanent Lemmy implementations come with an enable/disable toggle)

kn0wmad1c@programming.dev on 20 Aug 2024 20:52 collapse

Hey, just a heads up - I updated the extension to add some rudimentary keyboard navigation. Your j and k are there, and also you can use m to toggle the child comments for the selected comment.

Baizey@feddit.dk on 21 Aug 2024 08:46 collapse

If you wanna tighten up your extension build process feel free to steal my build setup :) (github.com/…/UniversalAutomaticCurrencyConverter )

It’s using esbuild and I’m using it to bundle for both chrome and Firefox separately (they expect slightly different manifest files), has multi entry points support (background, content, options and popup) and builds for ts/js

[deleted] on 21 Aug 2024 12:46 next collapse

.

Lemminary@lemmy.world on 21 Aug 2024 12:46 next collapse

bundle for both chrome and Firefox

You’re a true warrior tolerating that. It gives me headaches.

E: And you even set up Storybook? Respect.

Baizey@feddit.dk on 21 Aug 2024 15:19 collapse

Oh yeah, but the current manifest v3 difference between Firefox and Chrome is peanuts compared to when I had to have custom logic around regex as they didn’t support the same set of regex specs. Fuck that

[deleted] on 21 Aug 2024 21:26 collapse

.

ericjmorey@programming.dev on 20 Aug 2024 03:03 next collapse

I’m going to give this a try. Thanks for working on it!

LarkinDePark@lemmygrad.ml on 20 Aug 2024 18:12 collapse

I tend to think that extensions for websites should be treated as feature requests by the website. Reddit for example should have just incorporated RES features.

One I liked was tags for users to I could remember who they are better.

towerful@programming.dev on 20 Aug 2024 18:35 collapse

An extension is a great way for users to try features before companies implement them.
I have huge respect for games that enable modding, then - respectfully - incorporate mod QoL features into the main game. It shows they are listening to the community.

An extension is actually a great way to propose a feature, allow users to try it, and if it’s popular then you have a great case for devs to implement it.

And I wish that Reddit had spent time & money implementing RES features natively. It was basically a “Reddit but useable” feature list.

v9CYKjLeia10dZpz88iU@programming.dev on 21 Aug 2024 11:06 collapse

I thought that the idea of just explaining to instance hosters that they can start user-like scripts on every page might be a good enough plugin system for LemmyUI until there’s more effort into a real plugin system. Users don’t have to install extensions, and people running instances can make decisions for improving the UI.

With a centralized services like reddit, this doesn’t work very well. Though the fediverse allows lots of customizations when it’s related to themes.