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 14: | Line 14: | ||
var wikiManagerRow = $('#wiki-manager'); | var wikiManagerRow = $('#wiki-manager'); | ||
var table = wikiManagerRow.closest('table'); | var table = wikiManagerRow.closest('table'); | ||
// Move the Wiki Manager row to the top of the tbody | |||
var tbody = table.find('tbody'); | |||
wikiManagerRow.prependTo(tbody); | |||
// Check if the header is in the correct position | // Check if the header is in the correct position | ||
| Line 21: | Line 25: | ||
table.prepend(header); | table.prepend(header); | ||
} | } | ||
}); | }); | ||
Revision as of 00:05, 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');
// Move the Wiki Manager row to the top of the tbody
var tbody = table.find('tbody');
wikiManagerRow.prependTo(tbody);
// 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);
}
});