Add renumberByJS()

Add renumberByJS(), this is operational on my site for the last several months.

I have added neutered tests as you requested.  I added comments so people can see what they are supposed to look like, and may correct the test cases if they wish to run them.