User:Thespaceface/CustomUnits/WorldMetric0.js

var txt = document.getElementById('mw-content-text' ); var h = txt.innerHTML.replace(/([0-9.,]+) miles \(([0-9.,]+) km\)/g,'$2 kilometres'); h = h.replace(/([0-9.,]+) miles \(([0-9.,]+) km\)/g,'$2 kilometres'); h = h.replace(/([0-9.,]+) miles \(([0-9.,]+) km\)/g,'$2 kilometres'); h = h.replace(/([0-9.,]+–[0-9.,]+) miles \(([0-9.,]+–[0-9.,]+) km\)/g,'$2 kilometres'); h = h.replace(/([0-9.,]+–[0-9.,]+) feet \(([0-9.,]+–[0-9.,]+) m\)/g,'$2 metres'); h = h.replace(/([0-9.,]+–[0-9.,]+) inches \(([0-9.,]+–[0-9.,]+) mm\)/g,'$2 millimetres'); h = h.replace(/([0-9.,]+)-mile \(([0-9.,]+) km\)/g,'$2-kilometre'); h = h.replace(/([0-9.,]+)-mile \(([0-9.,]+)-km\)/g,'$2-kilometre'); h = h.replace(/([0-9.,]+)-foot \(([0-9.,]+) m\)/g,'$2-metre'); h = h.replace(/([0-9,.]+)-mile-long \(([0-9,.]+) km\)/g,'$2-kilometre-long'); h = h.replace(/([0-9,.]+ acres) \(([0-9,.]+ ha)\)/g,'$2'); h = h.replace(/([0-9,.]+ acres) \(([0-9,.]+ km 2<\/sup>)\)/g,'$2'); h = h.replace(/([0-9,.]+ acres) \(([0-9,.]+ km 2<\/sup>)\)/g,'$2'); h = h.replace(/([0-9,.]+ acres) \(([0-9,.]+ ha)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+) feet \((−?[0-9.,]+) m\)/g,'$2 metres'); h = h.replace(/([0-9,.]+ ft) \(([0-9,.]+ m)\)/g,'$2'); h = h.replace(/([0-9,.]+) pounds \(([0-9,.]+) kg\)/g,'$2 kilograms'); h = h.replace(/(−?[0-9,.]+) feet \((−?[0-9.,]+) m\)/g,'$2 metres'); h = h.replace(/([0-9,.]+) per square mile \(([0-9,.]+)\/km²\)/g,'$2 per square kilometre'); h = h.replace(/(−?[0-9,.]+ ft) \((−?[0-9,.]+ m)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+ ft) \((−?[0-9,.]+ m)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+ ft) \((−?[0-9,.]+ m)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+ ft) \((−?[0-9,.]+ m)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+ ft) \((−?[0-9,.]+ m)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+ ft) \((−?[0-9,.]+ m)\)/g,'$2'); h = h.replace(/([0-9,.]+)-square-foot \(([0-9,.]+) m 2<\/sup>\)/g,'$2-square-metre'); h = h.replace(/([0-9,.]+ sq ft) \(([0-9,.]+ m 2<\/sup>)\)/g,'$2'); h = h.replace(/([0-9,.]+ sq ft) \(([0-9,.]+ m 2<\/sup>)\)/g,'$2'); h = h.replace(/([0-9,.]+) per square mile \(([0-9,.]+)\/km²\)/g,'$2 per square kilometre'); h = h.replace(/([0-9,.]+) per square mile \(([0-9,.]+)\/km²\)/g,'$2 per square kilometre'); h = h.replace(/([0-9,.]+) people per square mile \(([0-9,.]+)\/km 2<\/sup>\)/g,'$2 people per square kilometre'); h = h.replace(/([0-9,.]+) inhabitants per square mile \(([0-9,.]+)\/km 2<\/sup>\)/g,'$2 inhabitants per square kilometre'); h = h.replace(/([0-9,.]+) yards \(([0-9.,]+) m\)/g,'$2 metres'); h = h.replace(/([0-9,.]+) yd \(([0-9.,]+) m\)/g,'$2 m'); h = h.replace(/([0-9,.−-]+ °F) \(([0-9,.−-]+ °C)\)/g,'$2'); h = h.replace(/([0-9,.−-]+ °F) \(([0-9,.−-]+ °C)\)/g,'$2'); h = h.replace(/([0-9,.−-]+ F) \(([0-9,.−-]+ C)\)/g,'$2'); h = h.replace(/([0-9,.−-]+ F) \(([0-9,.−-]+ C)\)/g,'$2'); h = h.replace(/([0-9,.]+ mi) \(([0-9,.]+ km)\)/g,'$2'); h = h.replace(/([0-9,.]+ sq mi) \(([0-9,.]+ km 2<\/sup>)\)/g,'$2'); h = h.replace(/([0-9,.]+) square miles \(([0-9,.]+) km 2<\/sup>\)/g,'$2 square kilometres'); h = h.replace(/([0-9,.]+) square miles \(([0-9,.]+) km 2<\/sup>\)/g,'$2 square kilometres'); h = h.replace(/([0-9,.]+ sq mi) \(([0-9,.]+ km²)\)/g,'$2'); h = h.replace(/([0-9,.]+ mi) \(([0-9,.]+ km)\)/g,'$2'); h = h.replace(/([0-9,.]+ in) \(([0-9,.]+ cm)\)/g,'$2'); h = h.replace(/([0-9,.]+) inches \(([0-9,.]+) cm\)/g,'$2 centimetres'); h = h.replace(/([0-9,.]+ in) \(([0-9,.]+ cm)\)/g,'$2'); h = h.replace(/(−?[0-9,.]+) feet \((−?[0-9.,]+) m\)/g,'$2 metres'); h = h.replace(/([0-9,.]+) inches \(([0-9,.]+) cm\)/g,'$2 centimetres'); h = h.replace(/([0-9,.]+ in) \(([0-9,.]+ mm)\)/g,'$2'); h = h.replace(/([0-9,.]+) inches \(([0-9,.]+) mm\)/g,'$2 millimetres'); h = h.replace(/([0-9,.]+ in) \(([0-9,.]+ mm)\)/g,'$2'); h = h.replace(/([0-9,.]+) inches \(([0-9,.]+) mm\)/g,'$2 millimetres'); h = h.replace(/([0-9,.]+ ft) \(([0-9,.]+ m)\)/g,'$2'); h = h.replace(/([0-9,.]+\/sq mi) \(([0-9,.]+\/km 2<\/sup>)\)/g,'$2'); h = h.replace(/([0-9,.]+\/sq mi) \(([0-9,.]+\/km²)\)/g,'$2'); h = h.replace(/([0-9,.]+ mi)() \(([0-9.,]+ km)\)/g,'$3$2'); h = h.replace(/([0-9,.]+ )() miles \(([0-9.,]+ )km\)/g,'$3$2 kilometers'); h = h.replace(/([0-9,.]+ )() miles \(([0-9.,]+) km\)/g,'$3$2 kilometers'); h = h.replace(/([0-9,.]+)-foot-wide \(([0-9.,]+) m\)/g,'$2-metre-wide'); h = h.replace(/([0-9,.]+) miles per hour \(([0-9.,]+) km\/h\)/g,'$2 kilometres per hour'); h = h.replace(/([0-9,.]+) miles per hour \(([0-9.,]+) kilometers per hour\)/g,'$2 kilometres per hour'); h = h.replace(/([0-9,.]+) mph \(([0-9.,]+) km\/h\)/g,'$2 km/h'); h = h.replace(/([0-9,.]+) mph \(([0-9.,]+) km\/h\)/g,'$2 km/h'); h = h.replace(/([0-9,.]+) mph \(([0-9.,]+) km\/h\)/g,'$2 km/h'); h = h.replace(/([0-9.,]+) kilometres \(([0-9.,]+) mi\)/g,'$1 kilometres'); h = h.replace(/([0-9.,]+–[0-9.,]+) kilometres \(([0-9.,]+–[0-9.,]+) mi\)/g,'$1 kilometres'); h = h.replace(/([0-9.,]+–[0-9.,]+) metres \(([0-9.,]+–[0-9.,]+) ft\)/g,'$1 metres'); h = h.replace(/([0-9.,]+–[0-9.,]+) millimetres \(([0-9.,]+–[0-9.,]+) in\)/g,'$1 millimetres'); h = h.replace(/([0-9.,]+)-kilometre \(([0-9.,]+) mi\)/g,'$1-kilometre'); h = h.replace(/([0-9.,]+)-kilometre \(([0-9.,]+)-mi\)/g,'$1-kilometre'); h = h.replace(/([0-9.,]+)-metre \(([0-9.,]+) ft\)/g,'$1-metre'); h = h.replace(/([0-9,.]+)-kilometre-long \(([0-9,.]+) mi\)/g,'$1-kilometre-long'); h = h.replace(/([0-9,.]+) metres \(([0-9.,]+) ft\)/g,'$1 metres'); h = h.replace(/([0-9,.]+ m) \(([0-9,.]+ ft)\)/g,'$1'); h = h.replace(/([0-9,.]+)-square-metre \(([0-9,.]+) sq ft\)/g,'$1-square-metre'); h = h.replace(/([0-9,.]+ m 2<\/sup>) \(([0-9,.]+ sq ft)\)/g,'$1'); h = h.replace(/([0-9,.]+ sq ft) \(([0-9,.]+ m 2<\/sup>)\)/g,'$1'); h = h.replace(/([0-9,.]+) per square kilometre \(([0-9,.]+)\/sq mi\)/g,'$1 per square kilometre'); h = h.replace(/([0-9,.]+) people per square kilometre \(([0-9,.]+)\/sq mi\)/g,'$1 people per square kilometre'); h = h.replace(/([0-9,.−-]+ °C) \(([0-9,.−-]+ °F)\)/g,'$1'); h = h.replace(/([0-9,.−-]+ °C) \(([0-9,.−-]+ °F)\)/g,'$1'); h = h.replace(/([0-9,.−-]+ C) \(([0-9,.−-]+ F)\)/g,'$1'); h = h.replace(/([0-9,.−-]+ C) \(([0-9,.−-]+ F)\)/g,'$1'); h = h.replace(/([0-9,.]+ km) \(([0-9,.]+ mi)\)/g,'$1'); h = h.replace(/([0-9,.]+ km 2<\/sup>) \(([0-9,.]+ sq mi)\)/g,'$1'); h = h.replace(/([0-9,.]+) square kilometres \(([0-9,.]+) sq mi\)/g,'$1 square kilometres'); h = h.replace(/([0-9,.]+) square kilometres \(([0-9,.]+) sq mi\)/g,'$1 square kilometers'); h = h.replace(/([0-9,.]+ km²) \(([0-9,.]+ sq mi)\)/g,'$1'); h = h.replace(/([0-9,.]+ km) \(([0-9,.]+ mi)\)/g,'$1'); h = h.replace(/([0-9,.]+) kilograms \(([0-9,.]+) lb\)/g,'$1 kilograms'); h = h.replace(/([0-9,.]+) kg \(([0-9,.]+) lb\)/g,'$1 kg'); h = h.replace(/([0-9,.]+ cm) \(([0-9,.]+ in)\)/g,'$1'); h = h.replace(/([0-9,.]+) centimetres \(([0-9,.]+) in\)/g,'$1 cm'); h = h.replace(/([0-9,.]+ cm) \(([0-9,.]+ in)\)/g,'$1'); h = h.replace(/([0-9,.]+) centimetres \(([0-9,.]+) in\)/g,'$1 centimetres'); h = h.replace(/([0-9,.]+ mm) \(([0-9,.]+ in)\)/g,'$1'); h = h.replace(/([0-9,.]+) millimetres \(([0-9,.]+) in\)/g,'$1 millimetres'); h = h.replace(/([0-9,.]+ mm) \(([0-9,.]+ in)\)/g,'$1'); h = h.replace(/([0-9,.]+) millimetres \(([0-9,.]+) mm\)/g,'$2 millimetres'); h = h.replace(/([0-9,.]+ m) \(([0-9,.]+ ft)\)/g,'$1'); h = h.replace(/([0-9,.]+\/km 2<\/sup>) \(([0-9,.]+\/ sq mi)\)/g,'$1'); h = h.replace(/([0-9,.]+\/km²) \(([0-9,.]+\/ sq mi)\)/g,'$1'); h = h.replace(/([0-9,.]+ km)() \(([0-9.,]+ mi)\)/g,'$3$2'); h = h.replace(/([0-9,.]+)-metre-wide \(([0-9.,]+) ft\)/g,'$1-metre-wide'); h = h.replace(/([0-9,.]+) kilometres per hour \(([0-9.,]+) mph\)/g,'$1 kilometres per hour'); h = h.replace(/([0-9,.]+) kilometres per hour \(([0-9.,]+) miles per hour\)/g,'$1 kilometres per hour'); h = h.replace(/([0-9,.]+) km\/h \(([0-9.,]+) mph\)/g,'$1 km/h'); h = h.replace(/([0-9,.]+) km\/h \(([0-9.,]+) mph\)/g,'$1 km/h'); h = h.replace(/([0-9,.]+) km\/h \(([0-9.,]+) mph\)/g,'$1 km/h');

txt.innerHTML = h;