MediaWiki:Common.js: Difference between revisions

From Realm Of Thrones
Jump to navigation Jump to search
SitX (talk | contribs)
No edit summary
SitX (talk | contribs)
No edit summary
Line 1: Line 1:
mw.loader.using('mediawiki.util').then(function() {
document.addEventListener("DOMContentLoaded", function () {
     function expandSidebar() {
     var toc = document.getElementById("toc");
        document.body.classList.add('vector-feature-sidebar-collapsed-disabled');
    var guidesSection = document.getElementById("p-Guides");  
         localStorage.setItem('vector-feature-sidebar-collapsed', 'false');  
 
    if (toc && guidesSection) {
         guidesSection.parentNode.insertBefore(toc, guidesSection);
     }
     }
    $(document).ready(function() {
        expandSidebar();
    });
});
});

Revision as of 02:19, 25 March 2025

document.addEventListener("DOMContentLoaded", function () {
    var toc = document.getElementById("toc"); 
    var guidesSection = document.getElementById("p-Guides"); 

    if (toc && guidesSection) {
        guidesSection.parentNode.insertBefore(toc, guidesSection);
    }
});