MediaWiki:Common.js: различия между версиями
Нет описания правки Метка: ручная отмена |
Нет описания правки |
||
| (не показано 38 промежуточных версий этого же участника) | |||
| Строка 1: | Строка 1: | ||
mw.loader.load( '/w/index.php?title=MediaWiki:Tooltips.js&action=raw&ctype=text/javascript' ); | mw.loader.load( '/w/index.php?title=MediaWiki:Tooltips.js&action=raw&ctype=text/javascript' ); | ||
window.tooltips_list = [ | window.tooltips_list = [ | ||
| Строка 18: | Строка 5: | ||
classname: 'tooltip-hero', | classname: 'tooltip-hero', | ||
parse: '{'+'{Tooltip/Hero|hero=<#hero#>}}' | parse: '{'+'{Tooltip/Hero|hero=<#hero#>}}' | ||
}, | |||
{ | |||
classname: 'tooltip-item', | |||
parse: '{'+'{Tooltip/Item|item=<#item#>}}' | |||
}, | |||
{ | |||
classname: 'tooltip-unit', | |||
parse: '{'+'{Tooltip/Unit|unit=<#unit#>}}' | |||
}, | |||
{ | |||
classname: 'tooltip-boss', | |||
parse: '{'+'{Tooltip/Boss|boss=<#boss#>}}' | |||
}, | }, | ||
]; | ]; | ||
| Строка 26: | Строка 25: | ||
waitForImages: true | waitForImages: true | ||
}; | }; | ||
$('.mainpage-navigation .card').hover( | |||
function() { | |||
$(this).children('.card-caption').children('a').css({'color' : '#7cabc9'}); | |||
}, function() { | |||
$(this).children('.card-caption').children('a').css({'color' : '#dfe1e3'}); | |||
} | |||
); | |||
$('.custom-grid__card').on('click', function() { | |||
window.location.href = $(this).find('a').attr('href'); | |||
}); | |||
Текущая версия от 04:19, 2 декабря 2023
mw.loader.load( '/w/index.php?title=MediaWiki:Tooltips.js&action=raw&ctype=text/javascript' );
window.tooltips_list = [
{
classname: 'tooltip-hero',
parse: '{'+'{Tooltip/Hero|hero=<#hero#>}}'
},
{
classname: 'tooltip-item',
parse: '{'+'{Tooltip/Item|item=<#item#>}}'
},
{
classname: 'tooltip-unit',
parse: '{'+'{Tooltip/Unit|unit=<#unit#>}}'
},
{
classname: 'tooltip-boss',
parse: '{'+'{Tooltip/Boss|boss=<#boss#>}}'
},
];
window.tooltips_config = {
offsetX: 20,
offsetY: 20,
waitForImages: true
};
$('.mainpage-navigation .card').hover(
function() {
$(this).children('.card-caption').children('a').css({'color' : '#7cabc9'});
}, function() {
$(this).children('.card-caption').children('a').css({'color' : '#dfe1e3'});
}
);
$('.custom-grid__card').on('click', function() {
window.location.href = $(this).find('a').attr('href');
});