'Scroll to End of Log' in output window

Naive implementation on vanilla-js.
Also, let's use a local scope `(function() { ... })()` to avoid naming collisions.