User:Bobblewik/monobook.js/unitformatter.js: Difference between revisions

Content deleted Content added
Bobblewik (talk | contribs)
mNo edit summary
Bobblewik (talk | contribs)
mNo edit summary
Line 62:
txt.value = txt.value.replace(/(\d)\s?m([\s,.;:\)\(\\/)])/g, '$1 m$2');
txt.value = txt.value.replace(/(\d)\-m([\s,.;:\)\(\\/)])/g, '$1 m$2');
//txt.value = txt.value.replace(/(\d)\s?ml([\s,.;:\)\(\\/)])/gig, '$1 ml$2');
//txt.value = txt.value.replace(/(\d)\-ml([\s,.;:\)\(\\/)])/gig, '$1 ml$2');
txt.value = txt.value.replace(/(\d)\s?m(\W)/gig, '$1 m$2');
txt.value = txt.value.replace(/(\d)\s?m(\w?\W)/gig, '$1 m$2');
 
// miles per hour