16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
(mediawiki.page.gallery自帶) |
(// 使用Wikiplus小工具快速编辑) |
||
(未显示同一用户的2个中间版本) | |||
* 3. 分类栏正确显示小写标题
* 4. 分类栏正确显示词曲作者的日文名
* 5. 触摸屏将packed-hover模式的gallery替换为packed
*
*
* @Dependencies: mediawiki.Title, ext.gadget.site-lib
* @Author: 如无特殊说明,均为[[User:Bhsd]]
if ($('#mainpage-style').length) { return; } // 避免不必要的下载
console.log('Hook: wikipage.content, 开始下载主页样式表');
mw.loader.load( '//
hook.remove( download );
};
.text(function() { return this.title.slice(9); });
});
/**
* @Function: 触摸屏代替gallery的hover效果
* @Source: mediawiki.page.gallery
*/
if (window.ontouchstart !== undefined ||
window.DocumentTouch !== undefined && document instanceof window.DocumentTouch) {
hook.add(function($content) {
console.debug('Hook: wikipage.content, 开始移除gallery的hover效果');
$content.find( 'ul.mw-gallery-packed-hover ' ).addClass( 'mw-gallery-packed' )
.removeClass( 'mw-gallery-packed-hover' );
});▼
}
/**
/**
* @Function: 禁止使用InPageEdit
* @Dependecies: ext.gadget.site-lib
*/
mw.messages.set('gadget-ipe-warn', wgULS(
'
▲}) );
▲const noIPE = function(msg) {
▲ {type: 'warn', autoHide: false, tag: 'InPageEdit'} );
};
▲});
mw.hook( 'InPageEdit.quickRedirect' ).add( noIPE );
mw.hook( 'InPageEdit.quickRename' ).add( noIPE );
|