Simply put the FSD boosts remaining in a stack along with the one time overcharge value and when plotting check the stack. While plotting check to see if the stack is empty. If it isn't, pop off the first value and use it's overcharge value as the max cost to reach the next node.
Full Answer
Which is a bit useless, as it takes more time to set it up than you'll save. Unless of course you are stuck like Dolphin said. BTW, using FSD boost for regular jumps increases fuel efficiency massively even jumping at your regular distance. Worth remembering if you are low on fuel and a couple of jumps from a useable star.
If you have a route plotted (which is why everyone is in this menu), when selecting FSD Boost, your destination and route are not considered in the boost range displayed as straight lines from the planet or station you are on.
FSD supercharging is the process of flying into a high-energy relativistic jet of a neutron star or a white dwarf in supercruise with a Fuel Scoop equipped, which increases the FSD range for the next jump at the cost of slight damage to the Frame Shift Drive itself.
Entering the jet will make the ship somewhat difficult to control: the magnetic forces of the jet will tug on the ship gently , not unlike the way an Frame Shift Drive Interdictor would affect a ship.
Neutron star exclusion zones are relatively small, so running into it is not much of a concern; however, white dwarfs have a much larger exclusion zone and will catch an unwary commander off guard quite easily.
Thus, it is not recommended to use white dwarfs for FSD supercharging, as the risk is generally not worth the lower 50% FSD range boost. Independently-charted Neutron Highways can be used to traverse vast distances with far fewer jumps than the conventional method of travel.
Disengaging supercruise while inside the jet is almost always lethal: the relativistic jet's sheer energy output will inflict damage to a ship's modules and hull, rendering almost all of them inoperable within a couple of minutes of initial exposure.