Great concept! These days I just block sites in my hosts file, but I also developed a Chrome extension based on the concept of "regulated distraction", Morphine:
https://chrome.google.com/webstore/detail/morphine/fbnpehpbo...
Also open source on GitHub: