revert javascript