MediaWiki:Gadget-EditTop.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Jon (WMF) (bicara | kontrib)
maintenance: more info Uncaught TypeError: Cannot read property 'replace' of undefined
Tidak ada ringkasan suntingan
 
Baris 41:
$("#mw_header h1, #content h1").first().append(span0);
span0.find("a").each(function (idx) {
var a = $(this), href;
a.attr("title", localtitles[mw.config.get( 'wgUserLanguage' )] || localtitles.en);
href = a.attr( "href" ) || '#';
if ( !/&(ve|)section=T/.test( a.attr( "href" ) ) ) { // not transcluded
a.attr( "href", a.attr( "href" ) && a.attr( "href" ).replace( /&(ve|)section=\d+/, "&$1section=0&summary=/*%20top%20*/%20" ) );
} else if ( /&vesection=/.test( a.attr( "href" ) ) ) { // transcluded, VE
a.attr( "href", mw.util.getUrl( mw.config.get( 'wgPageName' ) ) + "?veaction=edit&vesection=0&summary=/*%20top%20*/%20" );