A browser add-on wouldn't do the job. The use case was a parent controlling a child's behavior, not someone controlling their own.
I've deployed the same one for me, but setup for Reddit during work hours.
Both of us know how to get around the add-on. It's not particularly hard. But since Firefox is the primary browser for both of us, it does the trick.
I'm not affiliated with them, but it has helped me when I really need to focus.