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 53:
 
// kilometre per hour
txt.value = txt.value.replace(/km\/hr(\W)/gi, 'km/h$1');
txt.value = txt.value.replace(/kph(\W)/gi, 'km/h$1');
txt.value = txt.value.replace(/kmph(\W)/gi, 'km/h$1');
txt.value = txt.value.replace(/(\d)\s?kmh/gi, '$1 km/h');
txt.value = txt.value.replace(/km\/h/gi, 'km/h');
Line 94:
 
// mile per hour
txt.value = txt.value.replace(/m\.p\.h\.(\W)/gig, 'mph$1');
txt.value = txt.value.replace(/(\W)mph(\W)/gi, '$1mph$2');
txt.value = txt.value.replace(/(\d)\s?mph/gi, '$1 mph');
Line 111:
txt.value = txt.value.replace(/(\d)\s?ft(\W)/gi, '$1 ft$2');
txt.value = txt.value.replace(/(\d)\-ft(\W)/gi, '$1 ft$2');
txt.value = txt.value.replace(/(\W)ft\.\)/gi, 'ft$1ft)');
 
// square foot