I was overthinking it. I implemented the desired behavior by simply updating the scroll position very frequently while the animation was occurring, then stopped updating once it completes. It's not the cleanest code nor is the animation buttery smooth (notably smoother on Safari than Chrome), but it's much better than no animation.
I simply replaced the code in the else statement with this:
legal.className = activeClass;
var timer = setInterval(function() { window.scrollTo(0,document.body.scrollHeight) }, 5);
setTimeout(function() { clearInterval(timer) }, 500);