User:Neier/monobook.js/recat.js

//function to do search/replace function wpTextboxCatReplace {

var titletxt = document.title; titletxt = titletxt.replace(/Editing Category:(.*) singers - Wikipedia, the free encyclopedia/gi, '$1');

var txt = document.editform.wpTextbox1; txt.value = '{' + '{' + 'subst:CFR|Singers from '+ titletxt + '|Singers by location' + '}' + '}' + '\n' + txt.value; document.editform.wpMinoredit.checked = false; document.editform.wpWatchthis.checked = false; document.editform.wpSummary.value = 'CFR ';

//  txt.value = txt.value.replace(/([Cc]ategory:[Rr]ailway stations in \S+ Prefec[^\]]+\]\])/gi, '\$1\n[\[Category:Tazawako Line]]');

////txt.value = txt.value.replace(/\[\[[Cc]ategory:[Oo]lympic competitors for /gi, '[\[Category:Olympic athletes of ');

// txt.value = txt.value.replace(/\[\[[Cc]ategory:[Cc]ompanies by city/gi, '[\[Category:Companies by city in the United States');

//

//Sort (xyz in country) by country name // var titletxt = document.title // titletxt = titletxt.replace(/Editing Category:Sports teams in (.*) - Wikipedia, the free encyclopedia/gi, '$1'); // // txt.value = txt.value.replace(/[Cc]ategory:[Ss]ports teams by country/gi, 'Category:Sports teams by country|' + titletxt); //  document.editform.wpSummary.value = 'sort in category'; //  document.editform.wpMinoredit.checked = true; //  document.editform.wpWatchthis.checked = false;

//txt.value = txt.value.replace(/\[\[[Cc]ategory:[Aa]merican football competitions\]\]/gi, '');

//txt.value = txt.value.replace(/(\[\Cc]ategory:[Ff]ootballers at the )/i, '[\[Category:Olympic footballers of \n\$1');

//txt.value = txt.value.replace(/\[\[:[Cc]ategory:[Dd]issolved districts of /gi, '[[:Category:Former districts of ');

//  document.editform.wpSummary.value = 'Add category to railway stations'; //  document.editform.wpSummary.value = 'remove redundant parent cat'; // //  document.editform.wpSummary.value = 'recat Olympians by sport';

//  document.editform.wpSummary.value = 'recat Olympic soccer players';

//  document.editform.wpSummary.value = 'Recategorize to US-specific category'; //  document.editform.wpSummary.value = 'cat was renamed'; //  document.editform.wpMinoredit.checked = true; //  document.editform.wpWatchthis.checked = true; //  document.editform.wpWatchthis.checked = false; }