Rollback javascript