An open API service indexing awesome lists of open source software.

https://github.com/marioortizmanero/reddit-unit-converter

A userscript to automatically convert lbs to kgs and vice versa, specifically made for Reddit
https://github.com/marioortizmanero/reddit-unit-converter

conversor convert converter greasemonkey greasyfork javsacript kg kilograms lbs pounds reddit script tampermonkey unit userscript

Last synced: 3 months ago
JSON representation

A userscript to automatically convert lbs to kgs and vice versa, specifically made for Reddit

Awesome Lists containing this project

README

        

# Reddit Unit Converter
A userscript to automatically convert **lbs to kg** or vice versa, specifically made for Reddit. It currently replaces with a regular expression any matches with a number followed by `lbs` or `pounds` into a converted number followed by a space and `kg`.

## Customizing the script

* **Reverse mode:** Modify the const `reverseConverter` to true to convert kg to lbs instead.

* **Precise rounding:** Modify the const `round` to true to round the results with 2 digits.

* **Limiting the script to specific subs:** Modify the `match` tag at the top to something like `*://*.reddit.com/r/Brogress/*` to only use it on your preferred subreddits. Just keep adding match tags for every subreddit you want to use it on.

* **Automatic updating for RES scrolling:** Units won't be automatically converted when auto-scrolling with RES unless `updateForRES` is activated. This is disabled by default as it consumes more resources and it can cause errors with other extensions like Imagus.

## Downloading the script
The direct download link is here:

* [GreasyFork](https://greasyfork.org/en/scripts/378593-reddit-unit-converter)

**Chrome users:** you'll need a script manager extension like [TamperMonkey](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/) (the one I'm currently using) or [GreaseMonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/). Then go to the download link above and click on 'Install X.X'. Finally, click on 'install' in the new window that will open.

**Firefox users:** you'll need a script manager extension like [TamperMonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en). Then go to the download link above and click on 'Install X.X'. Finally, click on 'install' in the new window that will open.

**Other browsers:** you can look for a script manager extension in your browser add-ons page. Look for Tampermonkey or Greasemonkey and install them. Then go to the download link above and click on 'Install X.X'. Finally, click on 'install' in the new window that will open.