[RFC] Add a page unload warning message.

Also, inform user in case he attempts to close window after curation
but done button has failed.

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>
Space after `function` and `()`. Same for `if` in the lines below.