SYDNEY, Australia — Money raised for a teenager who shot to worldwide fame after smashing an egg on the head of an Australian far-right politician will go toward the victims of the New Zealand mosque shootings, according to his fund-raising page.

On Tuesday morning, a GoFundMe page for Will Connolly, now commonly known as Egg Boy, had already surpassed its goal of raising 50,000 Australian dollars, about $35,000. An update on the page said the 17-year-old Mr. Connolly “plans to send a majority of the money to the victims of the Christchurch terror attack.” The funds were originally intended to cover his legal fees and to help him buy “more eggs.”

The teenager gained fame after smashing an egg on the head of Fraser Anning, an anti-immigration senator, as the senator spoke to reporters in Melbourne, Australia, on Friday. The incident happened after Mr. Anning was widely condemned for a statement he made that day blaming Muslim immigration for Friday’s massacre in Christchurch, New Zealand.

After getting hit with the egg, Mr. Anning turned around and struck Mr. Connolly in the face twice. A brawl broke out that ended with Mr. Connolly being pinned down by men in the crowd. Mr. Connolly was arrested at the scene and released pending further investigation, the police said.