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 15: | Line 15: | ||
if ($('body').hasClass('skin-minerva')) { | if ($('body').hasClass('skin-minerva')) { | ||
$('#mw-content-text div section[class="mf-section-0"]').children().last() | $('#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"]'); | .insertAfter('#mw-content-text div section[class="mf-section-0"] div[class="infobox-idea"]:first'); | ||
} | } | ||
}); | }); | ||
Revision as of 16:14, 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');
}
});