MediaWiki:Common.js: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
(Utworzono nową stronę "→Umieszczony tutaj kod JavaScript zostanie załadowany przez każdego użytkownika, podczas każdego ładowania strony.: if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') { mw.loader.load('//imagemapedit.toolforge.org/ime.js'); }") |
Nie podano opisu zmian |
||
| Linia 3: | Linia 3: | ||
mw.loader.load('//imagemapedit.toolforge.org/ime.js'); | mw.loader.load('//imagemapedit.toolforge.org/ime.js'); | ||
} | } | ||
$(function() { | |||
function switchHeaderTab(tabId) { | |||
$('.header-tab-content-wrapper').hide(); | |||
$('.header-tab').removeClass('header-tab-selected').css('background', '#40444B'); | |||
$('#content-' + tabId).show(); | |||
$(.header-tab[data-tab-id='${tabId}']).addClass('header-tab-selected').css('background', '#36393F'); | |||
} | |||
$('.header-tab').click(function() { | |||
const tabId = $(this).data('tab-id'); | |||
switchHeaderTab(tabId); | |||
}); | |||
const defaultTab = $('.header-tab-content-wrapper:first').attr('id').replace('content-', ''); | |||
switchHeaderTab(defaultTab); | |||
}); | |||
Wersja z 19:18, 3 lis 2025
/* Umieszczony tutaj kod JavaScript zostanie załadowany przez każdego użytkownika, podczas każdego ładowania strony. */
if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
mw.loader.load('//imagemapedit.toolforge.org/ime.js');
}
$(function() {
function switchHeaderTab(tabId) {
$('.header-tab-content-wrapper').hide();
$('.header-tab').removeClass('header-tab-selected').css('background', '#40444B');
$('#content-' + tabId).show();
$(.header-tab[data-tab-id='${tabId}']).addClass('header-tab-selected').css('background', '#36393F');
}
$('.header-tab').click(function() {
const tabId = $(this).data('tab-id');
switchHeaderTab(tabId);
});
const defaultTab = $('.header-tab-content-wrapper:first').attr('id').replace('content-', '');
switchHeaderTab(defaultTab);
});