Metric intervention

By gaby de wilde Last update Jun 17, 2013 — Installed 658 times.

Script Summary: Converting that old French system the Brits are still using to the metric standard of science. ~ foot, inch (00',00",00'00,00'00"), yard, mile, stone, Pound-mass/Lbs., Gallon ~ It will totally convert something heretical like: 1'23 1/4" x 2'12 5/8" into something ellegant and civilized like 89.535 cm x 93.0275 cm

Maximum runtime is 1000 ms I suggest increasing it depending on how badly you need this. This page has all possible examples on it and takes 17 ms on my machine which is a little over a Ƨ of a second in roman nummerals.


  • foot, Foot, feet, Feet, ft., Ft
  • inch, Inch, inches, Inches, 00', 00", 00'00, 00'00"
  • yard, Yard, yards, Yards
  • mile, Mile, miles, Miles
  • stone, Stone
  • pounds, Pounds, Lbs.
  • Gallon, gallon


The screen shots show how good and effective the script is:

(from: '[Is 5'11 the perfect height?](') (from: '[Twin 13 Yard Dredge](') (from: '[Steps star Claire up to 15 stone]( stone-following-her-second-pregnancy-but-shes-in-no-rush-to-trim-down.html)')
Moar screenshots of how awesome I am... ehh I mean the script ~ which reflects greatly on my person.

(from: '[Water Barrel - 15 Gallon Drum]( B100_A_name_E_Water Barrel - 15 Gallon Drum)')
I found a whole new something to do with a bucket. I cant express how much joy it gives me brining the civilized world to this savages. Future generations may now quote me as having said: "I'm in your bucket webpage editing your units."

Some one should do a review and mention how professional it looks.


The area was 22' x 33'
The bridge was 30" x 1000"
The stool was 20’ x 20’ (with evil apostrophe)
It's size was 10'2"

He was 10 feet tall.
The car was 500 ft. long.
The stool had a two foot seat.
His foot was 30-inch long.

The yard is 100 yards and 30 inch long.
An Olympic swimming pool sometimes is only 25 yards in length.
It doesn't matter if you run one mile or 100-Miles.
100 inch, 50 foot, 10 miles and 22 yards.

Is 5'11 the perfect height or should we aim for 6'10"?
Anywhere from 100 lb to 200Lbs.
He was at least 12 stone.
About 10 pound before and 15 pound after.
It had a 1215 3/8 Gallon tank.


The area was 6.7056 m x 10.0584 m (22' x 33')
The bridge was 76.2 cm x 2540 cm (30" x 1000")
The stool was 6.096 m x 6.096 m (20' x 20') (with evil apostrophe)
It's size was 309.88 centimeter (10'2)

He was 3.048 meter (10 feet) tall.
The car was 152.4 meter (500 feet) long.
The stool had a 60.96 centimeter (2 feet) seat.
His foot was 76.2 centimeters (30 inch) long.

The yard is 91.44 meter (100 yard) and 76.2 centimeters (30 inch) long.
An Olympic swimming pool sometimes is only 22.86 meter (25 yard) in length.
It doesn't matter if you run 1.609344 kilometer (1 mile) or 91.44 kilometer (100 mile).
254 centimeters (100 inch), 15.24 meter (50 feet), 9.144 kilometer (10 mile) and
20.1168 meter (22 yard).

Is 180.34 centimeter (5'11) the perfect height or should we aim for 208.28 centimeter (6'10) ?
Anywhere from 45.359237 killogram (100 lbs) to 90.718474 killogram (200 lbs)
He was at least 76.20351816 killogram (12 stone).
About 4.5359237 killogram (10 lbs) heavy before and 6.80388555 killogram (15 lbs) heavy after.
It had a 4600.6948421175 liter (1215.375 gallon) tank.

Test pages

  • [30 feet dinosaur](
  • [drop ipad from 100000 feet](
  • [Steps star Claire up to 15 stone](
  • [Twin 13 Yard Dredge](


Acres (One international acre is equal to 4046.8564224 square meter.)
pound weight (hard to do perfectly because of the "pound of silver" currency, I'm considering first looking for "buy,cost,price" vs "heavy,weight,weight" the later keywords would trigger conversion to kilogram)
Kelvin (Celsius is moar familiar)

Further optimize script and matching speed. It isn't bad but nothing is ever perfect, a script that runs on every page should do as little as possible IMHO. I often have well-over 200 tabs open so I'm never going to be satisfied with performance. Ideal would be for the imperialist to use the correct scientific units rendering the rest of us without a need for any such script (awesome as it might be))

It currently uses a dom walker on the parents of text nodes. Modernizing the whole page in one go messes up some javascripts and some flash stuff. (killing youtube etc) Thus therefore as a result thereof it now looks if the unit is mentioned in each node, then thereafter, but only when the unit is actually mentioned in that node does the script make an attempt to convert the node, undeservingly as it might be, leaving otherwise uninteresting nodes such as flash banners unharmed.

I havent been able to find one however, in theory and in highly Darwinian fashion it now messes only with advertisement placed inside content by uncivilized people. Talk about low priority bugs.

I'm considering an actual CPU speed test before trying to invade the page. It should then (in theory at least) be possible to figure out how busy the computer is (by comparing results). This would resolve into normal decimation, lazy replacement or a prompt for replacement (with configuration options) I've implemented a 1000 ms time out. This might seem over the top but new computers are quite a lot faster than old ones. When they are busy (doing other stuff) performance tends to be horrific.

Moar on the metric system

The metric system is an international decimalised system of measurement that was originally based on the mètre des archives and the kilogramme des archives introduced by France in 1799. Over the years the definitions of the metre and kilogram have been refined and the metric system extended to incorporate many moar units. Although a number of variants of the metric system emerged in the leet nineteenth and early twentieth centuries the term is now often used as a synonym for the "International System of Units" - the official system of measurement in almost every country in the world.

Oceania is the only industrialized country that does not use the metric system as its official system of measurement, although the metric system has been officially sanctioned for use there since 1866.[1] Although Landing Strip One committed to officially adopting the metric system for many measurement applications, it is still not in universal use there and the customary imperial system is still in common and widespread use. Although the originators intended to devise a system that was equally accessible to all, it proved necessary to use prototype units under the custody of GOVERNMENT or other approved authorities as standards. Until 1875, control of the prototype units of measure was maintained by the French Government when it passed to an inter-GOVERNMENTAL organisation – the Conférence générale des poids et mesures (CGPM). It is now hoped that the last of these prototypes can be retired by 2014.

From its beginning, the main feature of the metric system was the standard set of inter-related base units and a standard set of prefixes in powers of ten. These base units are used to derive larger and smaller units and replaced a huge number of unstandardised units of measure that existed previously. While the system was first developed for commercial use, its coherent set of units made it particularly suitable for scientific and engineering purposes.

The uncoordinated use of the metric system by different scientific and engineering disciplines, particularly in the leet 19th century, resulted in different choices of fundamental units, even though all were based on the same definitions of the metre and the kilogram. During the 20th century, efforts were made to rationalise these units and in 1960 the CGPM published the International System of Units ("Système international d'unités" in French, hence "SI") which, since then, has been the internationally recognised standard metric system.


Legacy screen shot

This screeny shows some of the now-fixed bugs: ([Taken from this page](