(CNN) -- Roseanne Barr is blaming Ambien for her racist tweets and telling her fans, "I'm not a racist, just an idiot who made a bad joke."

She said on Tuesday that she was leaving Twitter, but she just can't seem to log off.

After ABC canceled her hit show "Roseanne" over her foul Twitter behavior, she went on another tweetstorm early Wednesday, retweeting fans who portrayed her as the victim of a liberal media double standard.

She zig-zagged between apologizing for her remarks and retweeting memes that made her apology sound insincere. All told, she posted more than 100 times.

Among her retweets: Photos of former Obama aide Valerie Jarrett side by side with an ape.

It was Barr's earlier tweet about Jarrett that caused outrage and ultimately led to the show's cancellation. In a response to a comment about Jarrett, Barr had said: "Muslim brotherhood & planet of the apes had a baby=vj."

Barr still claims she was just joking when she compared Jarrett to "Planet of the Apes" and the Muslim Brotherhood in a tweet on Tuesday morning.

In a reply to one of her fans, she said "I honestly thought she was Jewish and Persian-ignorant of me for sure, but...i did."

She also said she had been on Ambien, a medication used to treat insomnia, at the time.

She tweeted, "guys I did something unforgiveable so do not defend me. It was 2 in the morning and I was ambien tweeting -- it was memorial day too -- i went 2 far & do not want it defended -- it was egregious Indefensible. I made a mistake I wish I hadn't but...don't defend it please."

She cited Ambien again in a later tweet, saying, "Not giving excuses for what I did(tweeted) but I've done weird stuff while on ambien -- cracked eggs on the wall at 2am etc."

Oddly, she later deleted all of her references to the medication. Nevertheless, Ambien became the #1 trending topic on Twitter on Wednesday morning. Barr's explanation was deemed laughable.

"I have only taken Ambien once ... but I don't remember one of the side-effects being racism," CNN's John Berman tweeted.

In one of her other deleted tweets, Barr said "I'm sorry 4 my tweet, AND I will also defend myself as well as talk to my followers. so, go away if u don't like it. I will handle my sadness the way I want to. I'm tired of being attacked & belittled more than other comedians who have said worse."

Some of her replies to fans clearly expressed how she feels. At one point she said she believes she was fired because of fears over a potential boycott of the show's advertisers. She also lashed out at co-stars Michael Fishman and Sara Gilbert.

"You throw me under the bus. nice!" she said in a tweet directed at Fishman.

Her Twitter account had a manic feel throughout the morning. Through her selection of retweets, Barr implied that she was fired over her support for President Trump. One of the posts she shared said, inexplicably, "they brought the show back so they could inevitably cancel the show when she said something they didn't like."

But then she deleted her retweet of that post.

Another retweet, still up as of 7 a.m. ET, quoted Herman Cain on Fox saying "I believe they were looking for a reason to cancel #Roseanne and here's why. Even though the show was a ratings success, forces within ABC didn't like the fact that her conservative defense of certain things was so popular."

Barr also continued to tweet about George Soros, a liberal donor who has been painted as the villain in many right-wing conspiracy theories.

One message she re-tweeted on Wednesday falsely accused the Hungary-born Jewish billionaire of collaborating with the Nazis.

Barr also said her firing "worked out" because she "would leave when they started to try to censor me."

After a head-spinning 24 hours, there are several outstanding questions:

-- What will ABC schedule Tuesdays at 8 p.m. this fall in place of "Roseanne?"

-- Is there any possibility of a "Roseanne" sitcom without Barr? A way to keep the cast and crew together in some way?

-- Will there be any measurable backlash from her fans?

-- Will President Trump comment at all?

-- What will Barr do next?

Tom Werner, her longtime producing partner, told Deadline.com that he supported ABC's decision.

He said he hoped "Roseanne seeks the help she so clearly needs."

Copyright 2018 CNN. All rights reserved.