I used to scoff at things like Windscribe's ROBERT which does similar things for social sites, clickbait, gambling sites, porn etc...
Thinking it's more like a child blocker. But I've had battles with addiction and issues myself with keeping focused. Being able to have some kind of actual switch for what I can access often acts as a mental toggle. It changes my mode so to speak and I end up getting more done.
There's tons of cool free filters or blockers etc but I love your method. A physical button could be great for that mental switch aspect I was talking about.