MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary Tags: Mobile edit Mobile web edit |
||
| Line 2: | Line 2: | ||
/* Any JavaScript here will be loaded for all users on every page load. | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
$('.infobox-tab').click(function(e) { | |||
$('.infobox-tab').click(function(e) | |||
var tab = $(e.target).attr('data-tab'); | var tab = $(e.target).attr('data-tab'); | ||
$('.infobox-panel').hide(); | $('.infobox-panel').hide(); | ||
| Line 27: | Line 11: | ||
$(e.target).addClass('active'); | $(e.target).addClass('active'); | ||
}); | }); | ||
$(document).ready(function() { | |||
if ($(body).hasClass('skin-minerva')) { | |||
$('#mw-content-text div section[class="mf-section-0"]').children().last() | |||
.insertBefore('#mw-content-text div section[class="mf-section-0"] div[class="infobox-idea"]'); | |||
} | |||
}); | |||
Revision as of 16:05, 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()
.insertBefore('#mw-content-text div section[class="mf-section-0"] div[class="infobox-idea"]');
}
});