einars/js-beautify — pull request #109 by Infocatcher (2012-03-29 10:42:04+00:00)
Title: Save selection and scroll position

Seems to works, but really this is just "proof of concept".
And IE doesn't supported. :)
And I test only in Firefox 11.0.

So code should be improved and tested.