Joy Behar wanted to be nice to fellow Trump detractor James Comey by giving him a copy of her book, “The Great Gasbag: An A-to-Z Study Guide To Surviving Trump World.”

But then Behar realized the “C Is for Comey” section was “unflattering” to the former FBI director, so she ripped the offending page out before she handed it to him.

Comey was on “The View” last week to promote his memoir, “A Higher Loyalty.” But Behar blames him for Hillary Clinton ’s defeat because Comey announced 11 days before the election that he had reopened his investigation of the politician’s nonsecure, private e-mail server.

“He was sitting next to me, and I told him during a commercial break, ‘I want to give you a copy of my book.’ All of a sudden I remember he’s in the book and it’s unflattering,” Behar told me.

The book says, “Comey wants us to think he’s bipartisan, but he’s not bi — ­I think he was in bed with Trump, though Trump fired him anyway. Now I know what you call someone who says he goes both ways but really goes only one way: a Comeysexual.”

Referring to the rumor that J. Edgar Hoover was a closet cross-dresser, Behar wrote, “The only difference between James Comey and J. Edgar Hoover is that Hoover wore a junior petite cocktail dress, while Comey is a size 18.”

After her deletion, “I told him, ‘You have to know. I ripped out the page.’ I can’t lie. Some people can, like our president. But I can’t lie.”

Behar found Comey to be “a lovely guy” with a “great sense of humor,” but she still thinks that he “suffered from premature interpretation . . . He’s one of the main reasons why Hillary lost.”