If they want it, they pay. If they don't want it, don't pay, but don't get it either. Isn't that how you work as a contractor too? And doesn't that apply regardless of whether the work was agreed on in advance?
The suggestion in the post I was replying to was to involve osha and demand overtime pay for work previously done in spare time.
So no. The agreements the OP had with his company are irrelevant to his work hours. If OP did open source work on his free time, then later is asked by his company to take down said work, and complies, he is not entitled to any compensation, other than what his employer voluntarily offers him.
"If they claim ownership, despite the work having been done in your free time, demand the overtime pay."
OP is not saying "make them pay for having to take chart.js down", OP is saying "make them pay if they want to claim ownership of chart.js and want to use it internally". Big difference.