Content deleted Content added
Sideswipe9th (talk | contribs) →top: lets see if this fixes tocless pages |
Sideswipe9th (talk | contribs) →top: ok, now append the tools menu to the nav bar and lets see some magic |
||
Line 40:
// append this nav as a child to div with clas mw-page-container-inner
pageContainer[0].appendChild(nav);
// ok, now we have a nav element in the right place, time to move its content to the right place.
var newContainer = document.createElement("div"); // create a new div
newContainer.id = "vector-toc-pinned-container"; // give it the right id
newContainer.className = "vector-pinned-container"; // give it some class
nav.appendChild(newContainer); // and append it to the navbar
var toolsBar = document.getElementById("vector-page-tools"); // then grab the tools bar by ID
toolsBar.disabled = true; // because enabling the tools bar will break this, we want to force it to disabled
newContainer.appendChild(toolsBar); // and finally append the tools bar to the floating ToC*/
}
|