MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 322: Line 322:
         if (showMoolaBack) nav.appendChild(makeBtn(wikiUrl(primarySlug), 'मूल'));
         if (showMoolaBack) nav.appendChild(makeBtn(wikiUrl(primarySlug), 'मूल'));
         if (showUllekha) nav.appendChild(makeBtn(wikiUrl(primarySlug + '/Ullekha'), 'उल्लेख'));
         if (showUllekha) nav.appendChild(makeBtn(wikiUrl(primarySlug + '/Ullekha'), 'उल्लेख'));
        // Under the document's own title in the page, the same as on a
        // phone — not tucked into the contents panel, where these were
        // easy to miss. The contents panel is only the fallback.
        var docTitle = document.querySelector('#mw-content-text .gr-doc-title');
        if (docTitle && docTitle.parentNode) { docTitle.parentNode.insertBefore(nav, docTitle.nextSibling); return; }
        var h1 = document.getElementById('firstHeading') || document.querySelector('.mw-first-heading');
        if (h1 && h1.parentNode) { h1.parentNode.insertBefore(nav, h1.nextSibling); return; }
         var tocContents = toc.querySelector('.vector-toc-contents');
         var tocContents = toc.querySelector('.vector-toc-contents');
         if (tocContents) toc.insertBefore(nav, tocContents);
         if (tocContents) toc.insertBefore(nav, tocContents);