Forum:Renew hide rail code

I found an old code for hiding buttoms for the rail. Saidly it's an bit old and will now cause bugs:
 * On some pages the buttom will apear 2 times
 * The expand buttom should be able to make your content again visible without reloading your page. (toggle)

At the risk of starting a "whose code is better" fight, I wrote my own script to do this a few weeks ago after being disappointed with the ones I found floating around. This script also sort of works on Edit pages as well, for hiding the EditRail. Lunarity 13:07, August 3, 2012 (UTC)
 * Updated version. I fixed the Edit Page mode to work smarter and stopped it making the search box disappear on user pages. Lunarity 09:11, August 6, 2012 (UTC)

I works thx for all help--Jens Ingels (talk) 14:51, August 3, 2012 (UTC)

Edite: The new code work fine. Hower it only get some bugs:
 * The switch for edite and not editing are different. They renember on both spots and that gives bugs
 * The code activation will also work on other wikias without this function. What again give bugs
 * Something the var goes back to 1. So the buttoms says to expand when it's expand already.

I think the main problem would be that of working on other wikias.--Jens Ingels (talk) 22:34, August 6, 2012 (UTC)