注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
/* Главное меню. Табуляция. Взято с http://ru.summonerswar.wikia.com */
// Script for switching tabs on main page
(function($) {
function switchtab() {
if (!$('.switchtab').length) {
return;
}
$('.switchtab').click(function() {
if ($(this).hasClass('toggledtab')) {
return;
}
to_hide = $('.toggledtab').attr('data-tab');
to_show = $(this).attr('data-tab');
$('.toggledtab').toggleClass('toggledtab');
$(this).toggleClass('toggledtab');
$('.tab' + to_hide).hide(0);
$('.tab' + to_show).show(0);
});
}
mw.hook('wikipage.content').add(switchtab);
})(this.jQuery);