I, as many others do, use Lemvotes to check the votes on any Lemmy post or comment.
It’s a VERY simple website: you paste in a url and it returns a list of votes. That’s it.
So why are there 6,000 lines of obfuscated javascript? What’s it all doing? It serves 18 js files all referencing each other:

which amounts to 6k lines of javascript:
I know just a little js so I briefly tried to understand some bits of it but it just looks unrelated to the page. It has a load of strings that sound related to database queries, but there’s only one query you can make so that doesn’t need 6k lines. And I’d expect the query to be done server-side anyway so idk.
Any idea?
On first look, it seems to be built with svelte. Which is probably one of the less bloated frameworks, but it’s still a framework so you always have js overhead
I only took a cursory glance but a lot of that belongs to the UI framework (svelte)
Similar to react/vue, it’s used to render the content on the page, and automatically update what’s shown on the page when variables change value. This basically replaced jquery and the callback-hell that was mid-2000s web development

