Donating to Mozilla doesn’t change any behavior in Firefox.
Also, donations to Mozilla don’t go towards Firefox development. As far as I’m aware the only way to “give” money to Mozilla Corp (who work on Firefox, as opposed to the Mozilla Foundation) is to subscribe to the VPN service they resell.



Check your state or country’s laws, you might not even need the contract amended. In the state that I live in any contract clause that tries to prevent you from doing any work entirely on your own time with entirely your own materials is explicitly unenforceable.
Plus if it’s just a small open source library (assuming your employer is sane) it’d be a waste of money for them to even ask a lawyer to write a letter to you, because why would anyone care.
If you really care about getting it right, you can find a local employment attorney and have them explain your local laws and edit and/or negotiate your contract for you. I did that once, but I felt like it was probably a waste of the $900 I paid. (I mean, it definitely was a waste in that case because that job was a nightmare and it only lasted 2 months, lol.)