User talk:Ian Moody/custommainpage.js

From Wikipedia, the free encyclopedia

[edit] Back button bug fixed

Hi, I discovered that the original script had a bug, in that clicking the back button in your browser when on the preferred Main Page would just return you to that page again (via the nominal Main Page)... So I fixed it, replacing the 'action part' of the script by the following:

 location.replace("http://en.wikipedia.org/wiki/Main_Page_alternative_%28Classic_2006%29")

The location.replace method deletes the changed-from URL (here: the nominal Main Page) from the browser's history list, thus handily avoiding the 'back button bug'.

I have implemented the fix on my own user account, in case I want to do further changes to the script which might need testing before you'd want to include the code over here. --Wernher 22:26, 21 April 2006 (UTC)

Thank you for noticing and fixing that, I have incorporated the change into the script. — Ian Moody (talk) 18:54, 23 April 2006 (UTC)