-
Notifications
You must be signed in to change notification settings - Fork 26
Home
Durga71 edited this page Sep 22, 2020
·
8 revisions
- While surfing the internet many times we come values whose units we are unfamiliar with. For eg: While using online shopping websites the price of the product may be given in some different currency and we are usually interested in it being in our local currency.
- For this, we open up another tab to query the conversion manually. To avoid this task of having to open up another tab we present Smart Unit Converter which provides conversion of various units related to time, length, mass, temperature, and currency by simply selecting the value along with its unit.
- So, this extension can reduce the human effort to convert units.
- The initial release of this extension would allow you to perform conversions for the following metrics:
- Mass
- Temperature
- Currency
- Time
- Length
- After the extension is enabled, just navigate to any website say amazon.com, and highlight any of the metrics listed above. A popup would appear displaying the implemented conversions. For instance, if (say) $50 get highlighted, the extension would end up displaying its corresponding value in INR, CAD, Japanese Yen, Swiss Francs, and AUD
- Conversions: This directory consists of javascript scripts for handling various conversions.
-
Currency.js
handles currency conversions. -
Length.js
handles length conversions. -
Mass.js
handles mass conversions. -
Time.js
handles Time conversions. -
Temperature.js
handles temperature conversions.
In all these conversions, the input is first converted to a standard unit and then converted to popular corresponding units.
-
- Main Scripts: This directory consists of
content_script.js
,parser_script.js
,popular_units.js
,units_objects.js
, andutility.js
.-
content_script.js
: This script reads the data from the webpage and displays the converted results on to the webpage. -
parser_script.js
: This script reads selected text and identifies units and numbers for conversion. -
popular_units.js
: This has a map for all popular units for each implemented unit type and set of symbols for currency. -
units_objects.js
: This a comprehensive array of all units that will be recognized by the chrome extension. -
utility.js
: This script has all the utility functions, a function that sorts the array of units' names in the order of its length, filtering function that filters out the read unit from the webpage from the converted units, a function that returns a list of popular units that extension can convert except itself, a function that converts selected units to appropriate popular units, a function that returns converted values with a precision of at most 10 decimal places.
-
- Styling: This directory has
content_script.css
which handles the styling of results to the user.