MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
LadderGoat (talk | contribs) No edit summary |
LadderGoat (talk | contribs) No edit summary |
||
| Line 11: | Line 11: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// | // Select the Wiki Manager row and the table | ||
var wikiManagerRow = $('#wiki-manager'); | var wikiManagerRow = $('#wiki-manager'); | ||
var table = wikiManagerRow.closest('table'); | |||
// | // Check if the header is in the correct position | ||
var | var header = table.find('thead'); | ||
if (header.length && header.parent().children('thead').length > 0) { | |||
// Ensure header stays at the top | |||
table.prepend(header); | |||
} | |||
// | // Move the Wiki Manager row to the top of the tbody | ||
var | var tbody = table.find('tbody'); | ||
wikiManagerRow.prependTo(tbody); | |||
}); | }); | ||
Revision as of 00:04, 22 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() {
// Select the Wiki Manager row and the table
var wikiManagerRow = $('#wiki-manager');
var table = wikiManagerRow.closest('table');
// Check if the header is in the correct position
var header = table.find('thead');
if (header.length && header.parent().children('thead').length > 0) {
// Ensure header stays at the top
table.prepend(header);
}
// Move the Wiki Manager row to the top of the tbody
var tbody = table.find('tbody');
wikiManagerRow.prependTo(tbody);
});