Saturday, June 4, 2011

Don't loose your changes

Adding subtitles to a video is a lot of work. It takes a lot of time to write the transcript of the video, and to synchronize the subtitles. If you ever hit the back button or accidentally navigated to another page without saving your changes you probably lost some precious time and felt like you could choke someone.

Fear no more - we're not protecting you by confirming page navigations if there are pending changes that were not yet saved. If you make a change to a transcript, or modify something in the synchronization page and try to navigate to another page, you'll get the following warning:

You have pending changes. Are you sure you want to leave this page and loose changes?

Hope you'll never loose a change again :-)

Note: For the technical savvy, this is implemented using the onbeforeunload event, which is quite simple. I should have added it a long time ago.