User:Proteins/dynamicunits.js

// // Script to make measurement units dynamic, allowing them to be more accessible and easily interconverted // // To use this script, add "importScript('User:Proteins/dynamicunits.js');" to your monobook.js subpage // under your user page, as you can see at User:Proteins/monobook.js

var unit_prefixes = { "a" : "1.0e-18", "atto" : "1.0e-18", "f" : "1.0e-15", "femto" : "1.0e-15", "p" : "1.0e-12", "pico" : "1.0e-12", "n" : "1.0e-9", "nano" : "1.0e-9", "u" : "1.0e-6", "μ" : "1.0e-6", "micro" : "1.0e-6", "m" : "1.0e-3", "milli" : "1.0e-3", "k" : "1.0e3", "kilo" : "1.0e3", "M" : "1.0e6", "mega" : "1.0e6", "G" : "1.0e9", "giga" : "1.0e9", "T" : "1.0e12", "tera" : "1.0e12", "P" : "1.0e15", "peta" : "1.0e15" };

var length_units = { "meter" : "1.0", "meters" : "1.0", "foot" : "0.30", "feet" : "0.30" };

var length_units = { "second" : "1.0", "seconds" : "1.0", "hour" : "3600", "hours" : "3600" };

//****************** // The Main Function //******************

function dynamicUnits {

} // closes function dynamicUnits $(function { mw.util.addPortletLink('p-navigation', 'javascript:dynamicUnits', 'units', 'n-units', 'Make measurement units dynamic', , ); }); //