User:Jpmonroe/monobook.js

function wpTextboxReplace {       var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(" wiith ", "mg"), " with "); txt.value = txt.value.replace(new RegExp(" wwith ", "mg"), " with "); txt.value = txt.value.replace(new RegExp(" wwhen ", "mg"), " when "); txt.value = txt.value.replace(new RegExp(" whhen ", "mg"), " when "); txt.value = txt.value.replace(new RegExp(" wheen ", "mg"), " when "); txt.value = txt.value.replace(new RegExp(" whenn ", "mg"), " when "); txt.value = txt.value.replace(new RegExp(" wwas ", "mg"), " was "); txt.value = txt.value.replace(new RegExp(" ffrom ", "mg"), " from "); txt.value = txt.value.replace(new RegExp(" whiich ", "mg"), " which "); txt.value = txt.value.replace(new RegExp(" whhich ", "mg"), " which "); txt.value = txt.value.replace(new RegExp(" whichh ", "mg"), " which "); txt.value = txt.value.replace(new RegExp(" msot ", "mg"), " most "); txt.value = txt.value.replace(new RegExp(" liive", "mg"), " live"); txt.value = txt.value.replace(new RegExp(" betwen ", "mg"), " between "); txt.value = txt.value.replace(new RegExp(" beteen ", "mg"), " between "); txt.value = txt.value.replace(new RegExp("exmple", "mg"), "example"); txt.value = txt.value.replace(new RegExp("xampe", "mg"), "xample"); txt.value = txt.value.replace(new RegExp("dministat", "mg"), "dministrat"); txt.value = txt.value.replace(new RegExp("ssocati", "mg"), "ssociati"); txt.value = txt.value.replace(new RegExp("Cincinatti", "mg"), "Cincinnati"); txt.value = txt.value.replace(new RegExp("niverst", "mg"), "niversit"); txt.value = txt.value.replace(new RegExp("nstitue ", "mg"), "nstitute "); txt.value = txt.value.replace(new RegExp("Franciso", "mg"), "Francisco"); txt.value = txt.value.replace(new RegExp("ommeric", "mg"), "ommerci"); txt.value = txt.value.replace(new RegExp("ommm", "mg"), "omm"); txt.value = txt.value.replace(new RegExp("Geroge", "mg"), "George");

} $(function {    if (document.forms.editform) {        addPortletLink('p-cactions', 'javascript:wpTextboxReplace', 'Replace', 'ca-replace', 'Regexp replace for the edit window', 'R', document.getElementById('ca-history'));   } });