User:BrownHairedGirl/monobook.js

// add Script from WikiProject User scripts/Scripts/Replace function wpTextboxReplace {   var s = prompt("Search regexp:"); if(s){ var r = prompt("Replace /"+s+"/ with:"); if(!r && r !== '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "mg"), r); } } $.when( mw.loader.using( 'mediawiki.util' ), $.ready).done(function {    if (document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxReplace', 'replace', 'ca-replace', 'Regexp replace for the edit window', 'R', document.getElementById('ca-history'));   } });

// add Script from WikiProject User scripts/Scripts/Replace function wpTextboxFooReplace {   var s = "foo"; if(s){ var r = prompt("Replace /"+s+"/ with:"); if(!r && r !== '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "mg"), r); } }	$.when( mw.loader.using( 'mediawiki.util' ), $.ready).done(function {    if (document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxFooReplace', 'foo replace', 'ca-replace', 'foo Regexp replace for the edit window', 'R', document.getElementById('ca-history'));   } });

// add Script from WikiProject User scripts/Scripts/Replace function wpTextboxFooianReplace {   var s = "Fooian"; if(s){ var r = prompt("Replace /"+s+"/ with:"); if(!r && r !== '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "mg"), r); } }	$.when( mw.loader.using( 'mediawiki.util' ), $.ready).done(function {    if (document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxFooianReplace', 'Fooian replace', 'ca-replace', 'Fooian Regexp replace for the edit window', 'R', document.getElementById('ca-history'));   } });

// add Script from WikiProject User scripts/Scripts/Replace function wpTextboxIrishReplace {	   var s = "Irish"; if(s){ var r = prompt("Replace /"+s+"/ with:"); if(!r && r !== '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "mg"), r); } } $.when( mw.loader.using( 'mediawiki.util' ), $.ready).done(function {    if (document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxIrishReplace', 'Irish replace', 'ca-replace', 'Irish Regexp replace for the edit window', 'R', document.getElementById('ca-history'));   } });

// add Script from WikiProject User scripts/Scripts/Replace function wpTextboxIrelandReplace {	var s = "Ireland"; if(s){ var r = prompt("Replace /"+s+"/ with:"); if(!r && r !== '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "mg"), r); } } $.when( mw.loader.using( 'mediawiki.util' ), $.ready).done(function {    if (document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxIrelandReplace', 'Ireland replace', 'ca-replace', 'Ireland Regexp replace for the edit window', 'R', document.getElementById('ca-history'));   } });

function wpConvertCatsToLinks {   var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/\[\[[Cc]ategory:/g, "[[:Category:");

}	$.when( mw.loader.using( 'mediawiki.util' ), $.ready).done(function {    if (document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:wpConvertCatsToLinks', 'Cats to links', 'ca-replace', 'Convert Cats To Links', 'R', document.getElementById('ca-history'));   } });

// User:BrownHairedGirl/metadata.js - displays WikiProject assessments // User:Outriggr/metadatatest.js // importScript('User:BrownHairedGirl/metadatatest.js'); // assessmentMyTemplateCode = ["", "", "", "", "", "", ]; // assessmentDefaultProject = "WikiProject Ireland"; // 	assessmentMarkAsMinor = true; //