I actually built something like this for myself when I was learning javascript. It's buggy, but for the most part it works. http://okpeet.com/breaktimer/ if anyone wants to take a look.
I haven't had much time to work on it for a while. Contributions are very welcome!