Skip to content

marioortizmanero/reddit-unit-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

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:

Chrome users: you'll need a script manager extension like TamperMonkey (the one I'm currently using) or 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. 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.