this post was submitted on 19 Aug 2024
55 points (98.2% liked)

Programming

16977 readers
187 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

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.

top 9 comments
sorted by: hot top controversial new old
[–] cyberic@discuss.tchncs.de 12 points 3 weeks ago (2 children)

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

[–] kn0wmad1c@programming.dev 6 points 3 weeks ago (1 children)

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

[–] towerful@programming.dev 1 points 3 weeks ago* (last edited 3 weeks ago)

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 3 points 3 weeks ago (1 children)

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 4 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

If you wanna tighten up your extension build process feel free to steal my build setup :) (https://github.com/Baizey/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

[–] kn0wmad1c@programming.dev 1 points 3 weeks ago* (last edited 3 weeks ago)

Your repo made me want to convert the extension to TS, which I've never written in before.

So I did that, and I'm getting to learn a new syntax! Thanks :D

[–] Lemminary@lemmy.world 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

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 2 points 3 weeks ago

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

[–] ericjmorey@programming.dev 3 points 3 weeks ago

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