Keep viewport in the right place on window resize
See below or Try it live
In many responsive webpages, elements often resize itself when user resizes viewport, this then causes the region user was focusing on to float out of viewport. Rescroll tries to solve this by scrolling back to the right position on each resize event.
1. Go to a random Wiki page or a random Medium article
2. Put this snippet on your console
3. Scroll down & resize