On Saturday, Steve Mendelsohn received an unexpected phone call.

A staff member with the HBO comedy show “Last Week Tonight With John Oliver” had a small question about the Trevor Project, the nonprofit where Mr. Mendelsohn works and which the show planned to feature in a comedic call to arms.

In the segment, which was broadcast the next day, Mr. Oliver urged viewers to donate to causes he felt were being threatened by President-elect Donald J. Trump — and to do so on behalf of friends or loved ones who voted for him. The list of groups he encouraged his audience to support included the Trevor Project, which provides help to lesbian, gay, bisexual and transgender youth.

“It’s working,” Mr. Mendelsohn, the nonprofit’s deputy executive director, said on Wednesday, adding that the on-air mention helped sustain an outpouring of donations that had begun in the days after the election.