Modifying ConfirmEdit extension to make it API-friendly: