User:Surjection/tocColumn.js

Hello, you have come here looking for the meaning of the word User:Surjection/tocColumn.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Surjection/tocColumn.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Surjection/tocColumn.js in singular and plural. Everything you need to know about the word User:Surjection/tocColumn.js you have here. The definition of the word User:Surjection/tocColumn.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Surjection/tocColumn.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
mw.hook("wikipage.content").add(function($) {
    var toc = document.getElementById("toc");
    var bodyContent = document.getElementById("bodyContent");
    var contentText = document.getElementById("mw-content-text");
    var tocUl = document.getElementById("toc").querySelector("ul");
    if (toc && bodyContent && contentText) {
        var tocHolder = document.createElement("div");
        var tocParent = document.createElement("div");
        tocHolder.style.display = "flex";
        tocParent.style.marginLeft = "0.5em";
        bodyContent.insertBefore(tocHolder, contentText);
        tocHolder.appendChild(contentText);
        tocHolder.appendChild(tocParent);
        tocParent.appendChild(toc);
        contentText.style.flex = "1";
        contentText.style.flexShrink = "0";
        if (tocUl) {
            tocUl.style.width = "16em";
        }
    }
});