MediaWiki:Common.js: Difference between revisions
No edit summary Tags: Mobile edit Mobile web edit |
No edit summary Tags: Mobile edit Mobile web edit |
||
| Line 14: | Line 14: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
if ($('body').hasClass('skin-minerva')) { | if ($('body').hasClass('skin-minerva')) { | ||
/* $('#mw-content-text div section[class="mf-section-0"]').children().last() | |||
.insertAfter('#mw-content-text div section[class="mf-section-0"] div[class="infobox-idea"]:first'); | .insertAfter('#mw-content-text div section[class="mf-section-0"] div[class="infobox-idea"]:first');*/ | ||
var infoboxes = $('#mf-section-0 .infobox-idea'); | |||
// Move them to the end of the section | |||
$('#mf-section-0').append(infoboxes); | |||
} | } | ||
}); | }); | ||
Revision as of 16:26, 20 May 2025
console.log("✅ MediaWiki:Common.js loaded");
/* Any JavaScript here will be loaded for all users on every page load. */
$('.infobox-tab').click(function(e) {
var tab = $(e.target).attr('data-tab');
$('.infobox-panel').hide();
$('.infobox-panel.' + tab).show();
$('.infobox-tab').removeClass('active');
$(e.target).addClass('active');
});
$(document).ready(function() {
if ($('body').hasClass('skin-minerva')) {
/* $('#mw-content-text div section[class="mf-section-0"]').children().last()
.insertAfter('#mw-content-text div section[class="mf-section-0"] div[class="infobox-idea"]:first');*/
var infoboxes = $('#mf-section-0 .infobox-idea');
// Move them to the end of the section
$('#mf-section-0').append(infoboxes);
}
});