User:CWenger/emDashes.js

importScript('User:CWenger/emDashesFunction.js');

if(importScript("Wikipedia:AutoEd/core.js")) { function autoEdFunctions {   var txt = document.editform.wpTextbox1; var str = txt.value.replace(/&mdash;/g, '—'); var newstr = autoEdEmDashes(str); if(newstr != str) {     txt.value = newstr; autoEdTag = "removed spaces around em dashes using a script"; } }

autoEdLinkName = "—"; autoEdLinkHover = "Remove spaces around em dashes"; autoEdTag = ""; }