Jump to content

User:Timeshifter/vector-2022.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// This expands/collapses the Vector 2022 table of contents (TOC) via a text button: 
// "Expand all/Collapse all"
// Great for long pages and articles with multi-level TOCs. For example:
// https://en.wikipedia.org/wiki/Help:Table or articles for many country presidents. 
// https://en.wikipedia.org/wiki/Barack_Obama 
// https://phabricator.wikimedia.org/T302426
// From Village Pump discussions: 
// https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)/Archive_206#Button_to_expand_table_of_contents_in_Vector_2022
// https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)/Archive_206#New_Vector_2022_Skin_Navigation_Bar_(Table_of_Contents)_--_Expanded_View
// More info: https://en.wikipedia.org/wiki/User:The_wub/tocExpandAll.js 
// And here: https://en.wikipedia.org/wiki/User:The_wub/tocExpandAll.css 
// Add code below to https://en.wikipedia.org/wiki/Special:MyPage/vector.js 
importScript('User:The wub/tocExpandAll.js');