MediaWiki:Common.js:修订间差异
外观
Maintenance script(留言 | 贡献) 移动端不新开标签 |
Maintenance script(留言 | 贡献) 修移动端检测 |
||
| 第1行: | 第1行: | ||
/* | /* 内容区链接在新窗口打开(仅桌面端) */ | ||
$( function () { | $( function () { | ||
var isMobile = /Android|iPhone|iPad|iPod|Mobile/i.test( navigator.userAgent ) || window.innerWidth <= 720; | |||
if ( !isMobile ) { | |||
$( '#bodyContent a, #content a' ).attr( 'target', '_blank' ); | $( '#bodyContent a, #content a' ).attr( 'target', '_blank' ); | ||
} | } | ||
} ); | } ); | ||
2026年10月11日 (日) 00:43的版本
/* 内容区链接在新窗口打开(仅桌面端) */
$( function () {
var isMobile = /Android|iPhone|iPad|iPod|Mobile/i.test( navigator.userAgent ) || window.innerWidth <= 720;
if ( !isMobile ) {
$( '#bodyContent a, #content a' ).attr( 'target', '_blank' );
}
} );