Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
varAutoEd_baseurl='http://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Jonesey95/AutoEd/';if(location.protocol==='https:'){AutoEd_baseurl='https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Jonesey95/AutoEd/';}mw.loader.load(AutoEd_baseurl+'core6.js');//Imports the "framework" script needed to make this function//Sets variable configurationautoEdTag6="Fix invalid character(s) in [[WP:SDFORMAT|short description]]";//Tweaks edit summaryautoEdLinkName6="AutoEd SD";//Changes the link name at the top of the pageautoEdLinkHover6="Run AutoEd to fix one-off problem";//When user hovers over link//Set up functionfunctionReplace6(str){//function to replace duplicate page= parameters//Replace invalid characters in short descriptionstr=str.replace(/({{short description\|[^}]+\d\d *)[−—‐]( *\d\d[^}]+\})/gi,'$1–$2');//Fix excess spaces in year rangestr=str.replace(/({{short description\|[^}]+\(\d\d\d\d) +– +(\d\d\d\d\).+?(?=[\}]))/gi,'$1–$2');//Replace invisible characters with spacestr=str.replace(/({{short description\|[^}]+)[\t ]+(.+?(?=[\}]))/gi,'$1 $2');str=str.replace(/({{short description\|[^}]+)[\t ]+(.+?(?=[\}]))/gi,'$1 $2');str=str.replace(/({{short description\|[^}]+)[\t ]+(.+?(?=[\}]))/gi,'$1 $2');str=str.replace(/({{short description\|[^}]+)[\t ]+(.+?(?=[\}]))/gi,'$1 $2');str=str.replace(/({{short description\|[^}]+) (.+?(?=[\}]))/gi,'$1 $2');str=str.replace(/({{short description\|[^}]+) (.+?(?=[\}]))/gi,'$1 $2');//Replace invalid apostrophe or quote markstr=str.replace(/({{short description\|[^}]+[a-z])’(s.+?(?=[\}]))/gi,'$1\'$2');str=str.replace(/({{short description\|[^}]+[a-z])”(.+?(?=[\}]))/gi,'$1\"$2');str=str.replace(/({{short description\|[^}]+ )“(.+?(?=[\}]))/gi,'$1\"$2');//Otherstr=str.replace(/Gilgit−Baltistan/gi,'Gilgit-Baltistan');returnstr;}functionautoEdFunctions6(){//Activates individual modules when "auto ed" tab is clickedvartxt=document.editform.wpTextbox1;//leave this value as 1txt.value=Replace6(txt.value);}