FANDOM


Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Chrome - Windows: Hold the Ctrl key and press the F5 key. OS X: Hold both the ⌘ Cmd and ⇧ Shift keys and press the R key.
  • Safari - Hold down the ⇧ Shift key and click the Reload toolbar button.
  • Firefox - Windows: Hold the Ctrl key, and press F5. OS X: Hold the ⌘ Cmd and ⇧ Shift keys, and then press R.
  • Internet Explorer - Hold the Ctrl key, and press F5 (or click the Refresh button).
/**
 * Name:        ToggleSideBar
 * Author:      KockaAdmiralac <1405223@gmail.com>
 * Description: Adds a button for toggling the side bar
 */
$(function() {
    if($("#WikiaRail").length === 0) {
        return;
    }
    $("#WikiHeader .buttons").append(mw.html.element("button", {
        class: "wikia-menu-button secondary",
        id: "ToggleSideBarButton"
    }, "Toggle side bar"));
    $("#ToggleSideBarButton").click(function() {
        if($("#WikiaRail").css("display") === "block") {
            $("#WikiaRail").fadeToggle("slow", null, function() {
                $("#WikiaMainContent").animate({width: "100%"}, "slow");
            });
        } else {
            $("#WikiaMainContent").animate({width: ($("#WikiaPage").width() - 320) + "px"}, "slow", null, function() {
                $("#WikiaRail").fadeToggle();
            });
        }
    });
});
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+