rollback javascript