What I hate most about js is the overuse of inline functions... within inline functions, within inline functions.. That's just crazy. And if you miss 1 comma everything goes boom.
This code, however, is a wonderful example of clean code that can be done in JS. Not hacky, tricky stuff that some were expecting.
It's not per se elegant, but this is what I would call 'crystallizing' your code, which is refining it down to exactly and only what it needs to be. No extra variables or functions that you may need later, or might be cool at some point.
Every single thing here is used and nothing wasted, no extraneous junk to muck things up. And that's why they can keep it short, and explain how the whole thing works beautifully.
And now is the time that other coders will grab it and muck it all up