跳转到内容

MediaWiki:Common.js:修订间差异

来自中文精神分析知识库
Maintenance script​(留言 | 贡献)
禁用搜索下拉
Maintenance script​(留言 | 贡献)
移除页脚访客统计显示
标签:替换
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
/* 内容区链接在新窗口打开(仅桌面端) */
 
$( function () {
    var isMobile = /Android|iPhone|iPad|iPod|Mobile/i.test( navigator.userAgent ) || window.innerWidth <= 720;
    if ( !isMobile ) {
        $( '#bodyContent a, #content a' ).attr( 'target', '_blank' );
    }
    /* 禁用搜索建议下拉:出现即移除 */
    var removeSuggest = function() {
        $( '[role="listbox"], .suggestions-results' ).remove();
    };
    var obs = new MutationObserver( removeSuggest );
    obs.observe( document.body, { childList: true, subtree: true } );
} );

2026年10月11日 (日) 14:46的最新版本