Nice article!
Fun and instructive.
As someone else already mentioned, something similar is built in Elm, have a look at http://rtfeldman.github.io/elm-spa-example-with-debug/ and click on “Explore History”. You can re-play the interaction scrolling up and down.