跳转到内容

MediaWiki:Common.js:修订间差异

来自中文精神分析知识库
Maintenance script​(留言 | 贡献)
链接在新窗口打开
 
Maintenance script​(留言 | 贡献)
移动端不新开标签
第1行: 第1行:
/* 所有内容区链接在新窗口打开 */
/* 内容区链接在新窗口打开(仅桌面端,移动端不新开标签) */
$( function () {
$( function () {
     $( '#bodyContent a, #content a' ).attr( 'target', '_blank' );
     if ( window.innerWidth > 720 ) {
        $( '#bodyContent a, #content a' ).attr( 'target', '_blank' );
    }
} );
} );

2026年10月10日 (六) 15:13的版本

/* 内容区链接在新窗口打开(仅桌面端,移动端不新开标签) */
$( function () {
    if ( window.innerWidth > 720 ) {
        $( '#bodyContent a, #content a' ).attr( 'target', '_blank' );
    }
} );