FANDOM


This script is for PERSONAL use only!

You are free to install this script for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:Common.js or MediaWiki:Wikia.js), as it would violate Fandom's Terms of Use.
(See the customization policy)

ToggleSideBar is a snippet that shows a button near the action buttons, allowing the user to show/hide the sidebar.

Installation

Importing multiple scripts? This quick guide shows how to combine the imports.
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:ToggleSideBar/code.js',
    ]
});

Changelog

v1.0 (2016-09-08)
Initial revision
v1.1 (2017-02-18 • diff)
New i18n system
Firing a mw.hook named ToggleSideBar.loaded when the button is inserted
v1.2 (2017-02-21 • diff)
Fixed double-loading prevention
v1.3 (2017-07-13 • diff)
Fixes for new header (even before the new header was released)
Minor code changes
v1.3 (2017-07-15 • diff)
Use .WikiaPageContentWrapper's width instead of .WikiaPage's as a reference
v1.4 (2017-12-15 • diff)
Prevent double-loading
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+