for-of loop, lambdas/arrow functions and
await/promises make the code feel like something … expected.
What took perhaps most of the time was finding a new lightbox for images, etc., because the one I was using was using jQuery. After scouting about 10 and trying roughly 5, I ended up using simpleLightbox. Works for what I need and is not bloated with stuff I don’t use.
The complete change with previous and new code side-by-side is here. One thing I didn’t do, but wanted to, was wrapping the code into
class. I can’t comprehend why I need to use
this when calling instance method from another instance method.
It pleasantly surprised me how painless the process was. And I’m happy to have a bit lighter pages on this blog.