User:Ugog Nizdast/FloatingTOC

From wikishia

User:Ugog Nizdast/FloatingTOC.js

Introduction

This duplicate the Table of Contents and makes it float at the bottom right portion of the screen. It can be collapsed/expanded.

Installation

To implement this, add this to your common.js page (or any skin works fine):

importScript('User:Ugog Nizdast/FloatingTOC.js'); // [[User:Ugog Nizdast/FloatingTOC.js]]

Options

To make the default position left instead of right, add

var leftDefault = true;
importScript('User:Ugog Nizdast/FloatingTOC.js');

just before importScript.

Similarly, for it to be hidden or collapsed by default, add

var hideDefault = true;

Notes

This script is inspired from and replaces User:Osarius/FloatingTOC.css.