LLWiki正在建设中,欢迎加入我们

“MediaWiki:Gadget-site-lib.js”的版本间差异

跳转到导航 跳转到搜索
添加126字节 、​ 2021年2月20日 (六) 08:07
无编辑摘要
const hasIcon = options.some(function(ele) { return ele.icon; }),
$menu = $('<div>', $.extend({html: options.map(function(ele) {
returnconst $child = $('<a>', {href: ele.href, target: ele.target, class: ele.selected ? 'site-menu-selected' : '', html: [
hasIcon ? $('<i>', {class: 'fa' + (ele.icon ? 'fa-' + ele.icon : '')}) : null,
ele.msg ? mw.msg( ele.msg ) : ele.text
]}).data('data', ele.data).click( ele.click );
if ($.isPlainObject( ele.data )) { $child.data( ele.data ); }
else { $child.data('data', ele.data); }
return $child;
}), class: 'site-menu', tabindex: -1}, attr)).extend({ open: function() {
this.slideDown( 'fast' ).focus();
16,874

个编辑

导航菜单