Please don't do this!
A self-redirect initiated by the JavaScript to a page can make it very difficult to write a test for that page.
The test script is unable to determine whether the page has completed the redirect without checking the url.
In this example, try to write a test to get the "Horray" message.
Example script:
click | css=button
waitForCondition | selenium.getText('css=button') == "Done" | 10000
click | css=button