art fish intelligence

Share this post

How I transformed every news headline into a satire for April Fools

www.artfish.ai

Discover more from art fish intelligence

๐Ÿ’™ stories told using ~ art fish ~ intelligence ๐Ÿ’™
Continue reading
Sign in

How I transformed every news headline into a satire for April Fools

Using GPT-4 to write a Chrome extension that uses GPT-4 to modify website titles for no real reason

Yennie Jun
Apr 1, 2023
8
Share this post

How I transformed every news headline into a satire for April Fools

www.artfish.ai
Share
After using my Chrome extension on an IBM article titled โ€œWhat is AIโ€?

For April Fools Day, I decided that we all need a little more laughter in our livesโ€ฆ

So I made a Chrome extension that takes news headlines and converts them into the style of the Reductress. If you donโ€™t know what the Reductress is, itโ€™s one of my favorite places on the Internet. Itโ€™s a satirical womenโ€™s magazine with the mission to โ€œtake on the outdated perspectives and condescending tone of popular womenโ€™s media.โ€

For example, I can use the Chrome extension (which was both written by GPT-4) to rewrite an original NYT headline in a satirical tone (which was done by GPT-4). The original is on the left and the transformed version is on the right.

And the best part is that I did not write a single piece of code! Having never written a Chrome extension before, I was able to get this thing written and running in about 20 minutes.

๐ŸŽจ art fish intelligence ๐Ÿก is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

A few of my favorite examples

This Chrome extension works on most websites! While my initial vision was just to take news articles about depressing or ridiculous subjects and make them funny, I realized soon that it works on most websites. Here is a collection of some of my favorite examples.

CNN: South Korea and glass ceilings

Bloomberg: Stocks

Honestly, maybe I should start calling stocks โ€œCapitalismโ€™s Daily Mood Swingsโ€ now.

Costco โ€œNew Itemsโ€ Section

Recipes

What if every online recipe title was like thisโ€ฆ

The controversial letter to pause AI experiments

The Chrome Web Store Help: getting meta with this article

For fun: Rethinking book titles

Full Circle! Back to the Reductress

Of course, I had to try the extension on the original Reductress website.

Thanks for reading ๐ŸŽจ art fish intelligence ๐Ÿก. This post is public so feel free to share it.

Share

The Process

The process of making the Chrome extension was extremely simple. I didnโ€™t look up a single documentation about Chrome extensions. I havenโ€™t dealt with JavaScript code in over a year. I used GPT-4 through the ChatGPT interface.

When I had errors, I either described them in high level to GPT-4 or copied error messages, and it was able to handle all of them.

Tip 1: Start simple

I didnโ€™t start by asking GPT-4 to write a Chrome extension that detects news headlines on a webpage, calls the OpenAI GPT API to rewrite it in a new style, then replace the original title with the new title. The more complicated the directions are, the more room for error to mess up.

Instead, I started by asking for something simpler. I asked GPT-4 to first write a Chrome extension to get the headline from a news site, to perform a simple transformation (capitalizing the original text), then replacing it.

GPT-4 gave me the code for 4 different files and 7 very detailed steps in what to put in each file and how to upload them to the Chrome extension page.

Tip 2: Describe problems and GPT-4 will try to solve them

At first, the Chrome extension wasnโ€™t working. Even though I didnโ€™t give much detail, it was able to update the code to fix the problem.

In fact, I even told ChatGPT to add logging to help and it knew exactly the right places to put logging and also how to view the logging.

Tip 3: Iteratively add functionality

Once I validated that the Chrome extension was working, I was able to modify the functionality. I copied the curl example from the OpenAI API webpage and GPT-4 knew exactly from which file to make the API request.

Tip 4: Copy entire error messages

I copied the error I saw and GPT-4 knew how to fix this. No time wasted in debugging!

And thatโ€™s it! Super simple to make. Go forth and make your own silly Chrome extension!

Thanks for reading ๐ŸŽจ art fish intelligence ๐Ÿก. This post is public so feel free to share it.

Share

Blooper

Turns out that even this blog isnโ€™t safe from the Chrome extensionโ€ฆ

8
Share this post

How I transformed every news headline into a satire for April Fools

www.artfish.ai
Share
Comments
Top
New
Community

No posts

Ready for more?

ยฉ 2023 Yennie
Privacy โˆ™ Terms โˆ™ Collection notice
Start WritingGet the app
Substack is the home for great writing