Jump to content

User:Qwerfjkl (bot)/code/3

From Wikipedia, the free encyclopedia
shortdesc = "{{Short description|International sporting event}}\n"
if (oldText.match(/\{\{Short description/i) === null) { // no short description 
oldText = shortdesc + oldText
}
else { // Has short description, replace
oldText = oldText.replace(/\{\{\s*Short description\s*\|(?:1\=)?.+?\}\}/i, shortdesc)
}
summ = "Setting [[WP:Short description|Short description]] to \"International sporting event\" (via [[de:Benutzer:Schnark/js/bandersnatch|Bandersnatch]])"
return {text: oldText, summary: summ, bot: true};