add restore javascript.