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