MediaWiki:Common.js: Difference between revisions

From GrinderScape Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 14: Line 14:
     var wikiManagerRow = $('#wiki-manager');
     var wikiManagerRow = $('#wiki-manager');
      
      
     // Find the parent table and the tbody
     // Find the closest table, specifically the tbody section
     var tableBody = wikiManagerRow.closest('table').find('tbody');
     var tableBody = wikiManagerRow.closest('table').find('tbody');
      
      
     // Move the row to the top of the tbody (below the header)
     // If the tbody exists, move the row to the top of it
    wikiManagerRow.prependTo(tableBody);
    if (tableBody.length > 0) {
        wikiManagerRow.prependTo(tableBody);
    }
});
});

Revision as of 23:58, 21 March 2025

/* Load dependencies */
// mw.loader.load('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css', 'text/css');

/* Remove unessecary footer text */
$(document).ready(function() {
    var footerInfo = document.getElementById("footer-info-credits");
    if (footerInfo) {
        footerInfo.innerHTML = footerInfo.innerHTML.replace("GrinderScape Wiki user", "");
    }
});

$(document).ready(function() {
    // Target the row with ID 'wiki-manager'
    var wikiManagerRow = $('#wiki-manager');
    
    // Find the closest table, specifically the tbody section
    var tableBody = wikiManagerRow.closest('table').find('tbody');
    
    // If the tbody exists, move the row to the top of it
    if (tableBody.length > 0) {
        wikiManagerRow.prependTo(tableBody);
    }
});