User:Prtksxna/ptoc

{{infobox user script

| name = ptoc.js

| desc = Persistent table of contents in sidebar

| author = {{u|Prtksxna}}

| updated = {{start date and age|2015|1|19}}

| status = Stable

| version = ?.0

| source = User:Prtksxna/ptoc.js, User:Prtksxna/ptoc.css

| skins = Vector

| browsers = Any modern browser

| screenshot = 300px

| screenshot-caption = Closed persistent toc

| styled = yes

}}

A gadget to add persistent table of contents on articles. The table of contents move to the left sidebar after scrolling past the first section and they expand on hover.

Source

Source is on [https://github.com/prtksxna/persistent-toc Github] so are [https://github.com/prtksxna/persistent-toc/issues/ issues].

Setup

Add this to your common.js:

importStylesheet("User:Prtksxna/ptoc.css");

importScript("User:Prtksxna/ptoc.js");