MediaWiki:Common.js: различия между версиями
Материал из SAMP
Нет описания правки |
Нет описания правки |
||
Строка 13: | Строка 13: | ||
{ | { | ||
var link = $(this).html(); | var link = $(this).html(); | ||
document.location.href = 'https://wiki.samp.world/index.php/'+link; | |||
}); | }); |
Текущая версия от 00:57, 1 июня 2025
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */ $(document).on('click','.index_elem', function(event) { var target = event["target"]["parentElement"]["className"]; if (target != "index_subelems") { if ($(this).hasClass('active')) { $(this).removeClass('active'); } else { $(this).addClass('active'); } } }); $(document).on('click','.index_subelem', function() { var link = $(this).html(); document.location.href = 'https://wiki.samp.world/index.php/'+link; });