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 37:
txt.value = txt.value.replace(/(\d)\s?m(\W)/g, '$1 m$2');
txt.value = txt.value.replace(/(\d)\-m(\W)/g, '$1 m$2');
txt.value = txt.value.replace(/(\d)\s?sq\.?\s?m([^i]\W)/gi, '$1 m²$2');
txt.value = txt.value.replace(/m²\.\)/gi, 'm²)');
 
// millimetre
Line 49 ⟶ 51:
txt.value = txt.value.replace(/(\d)\s?sq\.?\s?kms?/gi, '$1 km²');
txt.value = txt.value.replace(/sq\.?\s?kms?/gi, 'km²');
txt.value = txt.value.replace(/(\d)\s?sq\.?\s?m([^i])/gi, '$1 m²$2');
txt.value = txt.value.replace(/m²\.\)/gi, 'm²)');
 
// kilometre per hour