vichan-devel / vichan

Vichan is the most popular and widely used imageboard software in the world. It is a free, light-weight, fast, highly configurable and user-friendly imageboard software package.
https://vichan.info
Other
635 stars 198 forks source link

Dropping jQuery #792

Open perdedora opened 3 months ago

perdedora commented 3 months ago

I think we began using because was easier and cross compatibility between browsers. But this was ~10 years ago, now vanilla javascript can achieve everything we do and remove the sluggish of jQuery.

Plus most of the scripts are almost illegible hacking away trying to make it work and this are going to give us a opportunity to make it easier to debug.

crazy4cars69 commented 2 months ago

If it ain't broke, don't fix it. But i don't think old jquery is eating RAM that much.

andrewwhiteingale commented 2 months ago

that will require removing a lot of written javascript by czaks. quite many of them use jquery in practically everywhere.

perdedora commented 2 months ago

I've rewritten a lot of the scripts we use already. There's only a few left (customized post-hover, quick-reply, post menu, post filter, fix report... and file selector)

I can see some improvements by using async/await/promise functions. The page loads improved (although this may be because of preload), and improved readability a lot.

ghost commented 2 months ago

@perdedora Your idea has obvious merit, as vanilla js has came a long way. Vanilla js would make the js functions more reliable and modernized and modular. With that being said, i give you full authority to go ahead and make the changes. Also, go ahead and update everything to php 8.4, i grant you full authority to do that, too. If anyone asks, just say i gave the green light. Thanks!