今天是2025年12月18日 第51周 星期四
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
“MediaWiki:Gadget-noteTAvector.js”的版本间的差异
跳到导航
跳到搜索
ZhWP>WhitePhosphorus (这样会加载两次) |
小 (导入1个版本) |
(没有差异)
| |
2020年6月5日 (五) 23:49的最新版本
noteTAvector = ( function() { $( function() {
$( 'body.skin-vector .mw-indicator[id^=mw-indicator-noteTA-]' )
.addClass( 'vectorTabs' )
.removeAttr( 'style' )
.empty()
.each( function() {
$( '<a href="#"><span style="padding:1px 3px; background: #d3e3f4; color:#000000;height:85%;">汉</span><span style="padding:1px 3px; background: #e9e9e9; color:#434343;height:85%;">漢</span></a>' )
.click( function( e ) {
e.preventDefault();
} )
.wrap( '<ul><li><span></span></li></ul>' )
.parent().parent().parent().appendTo( this );
} )
.insertAfter( '#p-variants' );
} ); } );
mw.hook('wikipage.content').add( function ( $content ) {
//if ( $( '#p-variants' ).next().hasClass('vectorTabs') ) return;
$( '#p-variants' ).next().remove(); // Will blink duing load preview, but this will avoid the icon won't removed if the TA template is removed, and avoid repeated click event listener from noteTAViewer.
setTimeout("noteTAvector();", 1);
});