User:Lightmouse/monobook.js/script.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 528:
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-| |)(indicated(?:\s|-| |)horsepower)([:;,\.?!]?\s[^\d\(\)\/\\])/gi, '$1{{convert|$2|ihp}}$4');
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-| |)(hp|bhp|ihp|shp)([:;,\.?!]?\s[^\d\(\)\/\\])/gi, '$1{{convert|$2|$3|abbr=on}}$4');
 
txt.value=txt.value.replace(/({convert\|\d{1,16}\|)horsepower\|/gi, '$1horsepower|');
txt.value=txt.value.replace(/({convert\|\d{1,16}\|)hp\|/gi, '$1hp|');
txt.value=txt.value.replace(/({convert\|\d{1,16}\|)bhp\|/gi, '$1bhp|');
txt.value=txt.value.replace(/({convert\|\d{1,16}\|)ihp\|/gi, '$1ihp|');
txt.value=txt.value.replace(/({convert\|\d{1,16}\|)shp\|/gi, '$1shp|');
 
// rpm