magma1447 / greasemonkey-geocaching-projectgc

Adds links and data to Geocaching.com to make it collaborate with Project-GC.com
MIT License
18 stars 14 forks source link

Option for FP% with decimals #103

Closed PleuPleu closed 2 years ago

PleuPleu commented 3 years ago

I don't know if I'm missing any downside with parseFloat that I didn't find on my googling, I technically don't know what I'm doing here but this seems to work as far as I've tried it at least. :)

The idea is that users can chose if they want FP% to show as the script does now, or select the option for showing it with two decimals as it's done on PGCs top list to solve the issue with the script dropping the decimals instead of rounding them. Default is false for the FP%-with-decimals-option and using both at the same time looks ugly. This could probably be done in a better/smoother way, but it's my first try.

magma1447 commented 2 years ago

This patch has the issue that you can have both FPP and FPP-dec turned on, which isn't perfect.

Since I don't think most care about the decimals, I would suggest "hiding" them in a mouse-over using the html attribute title in the paragraph element. What do you think about that?

magma1447 commented 2 years ago

Just one minor thing left. Notice in the diff that line 652 has gone from an empty line to a line with a few tabs or spaces, and then no text? Make sure it's an empty line again and it's all perfect.

PleuPleu commented 2 years ago

Too helpful editor, should be corrected now. :)