Diferencia entre revisiones de «Usuario:Stargazer/common.js»
Ir a la navegación
Ir a la búsqueda
m (Hmm, can we make this display just when the page is viewed too?) |
m (Looks like editintro can't be used when just viewing; might as well put Visual Editor back) Etiqueta: Deshacer |
||
Línea 1: | Línea 1: | ||
function addEditIntro( name ) { |
function addEditIntro( name ) { |
||
− | $( '.mw-editsection, #ca-edit, #ca- |
+ | $( '.mw-editsection, #ca-edit, #ca-ve-edit' ).find( 'a' ).each( function ( i, el ) { |
el.href = $( this ).attr( 'href' ) + '?&editintro=' + name; |
el.href = $( this ).attr( 'href' ) + '?&editintro=' + name; |
||
} ); |
} ); |
Revisión del 19:12 28 jul 2020
function addEditIntro( name ) { $( '.mw-editsection, #ca-edit, #ca-ve-edit' ).find( 'a' ).each( function ( i, el ) { el.href = $( this ).attr( 'href' ) + '?&editintro=' + name; } ); } if ( mw.config.get( 'wgNamespaceNumber' ) === 0 ) { $( function () { var cats = mw.config.get( 'wgCategories' ); if ( !cats ) { return; } if ( $.inArray( 'Stormlight Archive', cats ) !== -1 || $.inArray( 'General cosmere', cats ) !== -1 ) { addEditIntro( 'MediaWiki:Top-notice-ns-0' ); } } ); }