User:Canadabonk/common.js: Difference between revisions
Content deleted Content added
Canadabonk (talk | contribs) No edit summary |
Canadabonk (talk | contribs) No edit summary |
||
Line 21: | Line 21: | ||
// get contents of toc |
// get contents of toc |
||
const sidetoc = $('.ct-toc'); |
const sidetoc = $('.ct-toc'); |
||
$('#toc').find('ul').first().clone().appendTo('.ct-toc, # |
$('#toc').find('ul').first().clone().appendTo('.ct-toc, #CosmosRail'); |
||
sidetoc.find('ul').first().wrap('<div class="ct-stickytoc"></div>'); |
sidetoc.find('ul').first().wrap('<div class="ct-stickytoc"></div>'); |
||
Line 39: | Line 39: | ||
// siderail toc |
// siderail toc |
||
⚫ | |||
$('#CosmosRail').find('ul').first().wrap('<section class="module ct-railtoc"></section>'); |
$('#CosmosRail').find('ul').first().wrap('<section class="module ct-railtoc"></section>'); |
||
⚫ | |||
railtoc.prepend('<div><h3>Contents</h3><span class="ct-toc-move">Move to sidetools</span></div>'); |
railtoc.prepend('<div><h3>Contents</h3><span class="ct-toc-move">Move to sidetools</span></div>'); |
||