Alert when quitting with uncommitted changes

It would be nice to have an alert when closing the webapp with uncommitted changes.
It should be trivial to implement by using the browser’s unload event.

Auto commit to git is not working for me, and without something like this it’s very probable that I’ll end up with out of sync graphs sooner or later.