User:Neier/monobook.js/prefecture

//function to do subst:nft and subst:fc search/replace ( based on above, WikiProject User scripts/Scripts/Replace ) function wpTextboxPrefCatReplace {  var txt = document.editform.wpTextbox1;

txt.value = txt.value.replace(/\|Dissolved municipalities\]\] in/gi, '|Dissolved municipalities]] formerly in');

txt.value = txt.value.replace(/\[\[[Cc]ategory:[Tt]owns in \S+ Prefecture\]\]/gi, );  txt.value = txt.value.replace(/\[\[[Cc]ategory:[Cc]ities in \S+ Prefecture\]\]/gi, );   txt.value = txt.value.replace(/\[\[[Cc]ategory:[Vv]illages in \S+ Prefecture\]\]/gi, );   txt.value = txt.value.replace(/\[\[[Cc]ategory:[Dd]istricts in \S+ Prefecture\]\]/gi, );

txt.value = txt.value.replace(/[Cc]ategory:[Dd]issolved municipalities of Japan\|(\S+), [^\]]+\]\]/gi, 'Category:Dissolved municipalities of \$1 Prefecture]]');

txt.value = txt.value.replace(/[Cc]ategory:[Dd]issolved districts of Japan\|(\S+), [^\]]+\]\]/gi, 'Category:Dissolved districts of \$1 Prefecture]]');

txt.value = txt.value.replace(/issolved districts of Hokkaido/gi, 'issolved districts of Hokkaidō'); txt.value = txt.value.replace(/issolved districts of Hyogo/gi, 'issolved districts of Hyōgo'); txt.value = txt.value.replace(/issolved districts of Kochi/gi, 'issolved districts of Kōchi'); txt.value = txt.value.replace(/issolved districts of Oita/gi, 'issolved districts of Ōita');

txt.value = txt.value.replace(/issolved municipalities of Hyogo/gi, 'issolved municipalities of Hyōgo'); txt.value = txt.value.replace(/issolved municipalities of Kochi/gi, 'issolved municipalities of Kōchi'); txt.value = txt.value.replace(/issolved municipalities of Oita/gi, 'issolved municipalities of Ōita');

document.editform.wpSummary.value = 'Recat of dissolved districts'; document.editform.wpMinoredit.checked = true; document.editform.wpWatchthis.checked = false; }