Emulate AddPageToFavorites functionality.