MediaWiki:Gadget-NewVillagePump.js/Core.js: diferenças entre revisões

Conteúdo apagado Conteúdo adicionado
Manutenção: Uso de typeof ... === 'function' em vez de $.isFunction(...), que tornou-se obsoleta (Localizar com regex: \$\.isFunction\( (.+?) \); Substituir por: typeof $1 === 'function')
Manutenção: Uso de String.prototype.trim em vez de jQuery.trim, que tornou-se obsoleta
Linha 46:
var i, reSec, match, separator, id, next, updatedText,
pos = {};
existingText = $existingText.trim( existingText );
 
// Fill in pos with the position of each existing section
Linha 90:
} else {
// The new text can be inserted at the end of the page
updatedText = existingText + separator + $newText.trim( newText );
}
 
Linha 242:
y = today.getFullYear(),
shortDate = d + m.substr( 0, 3 ) + y,
topic = $sum.trimreplace( /\[\[.+?\|(.+?)\]\]/g, '$1' )
sum.replace( /\[\[.+?\|(.+?)\]\]/g, '$1' )
.replace( /\[{\[{(.+?)(?:\|.*?)?\]}\]}/g, '$1' )
.replace( /[\{\{(.+?)(?:}\|.*?)?[\}]\}|]/g, '$1 ' )
.replace( /[\{\}\[\]\|]s+/g, ' ' )
.replace( /\s+=/g, ' ' )
.replacetrim( /=/g, ' ' ),
),
topicAndDate, fullTopicTitle;
 
Linha 261 ⟶ 260:
}
 
if ( $content.trim( content ) === '' ) {
alert( mw.message( 'nvp-edit-needContent' ) );
nvp.$textBox.focus();