Using ChatGPT to make a JavaScript bookmarklet

I get newsletters from the Chronicle of Higher Education. They frequently have links to interesting articles on the Chronicle’s web site, but they are also a little bit annoying. The articles are paywalled, but I don’t have a personal account. Instead, I read using my institution’s account. Because of that, I often have trouble logging in at the home page and then finding the article again. For fun, I wanted to see if this was a problem ChatGPT could help me fix. (Spoiler alert, it can. Solution below.)

If you happen to be a Wichita State person reading this (hello student or colleague!), here’s the bookmarklet: [read via WSU]

You can just drag it to your browser’s bookmarks bar and it should work. If not, you can copy the code from this Gist and paste it into your browser’s bookmarks menu like in the video above.

EDIT: I changed the name of the bookmarklet in the link above because this works with lots of other services as well, including fan-favorite JSTOR.

CS 101 with Jerry Seinfeld

ChatGPT prompt: Write a script for an episode of Seinfeld that explains object-oriented programming.


Here’s a script for an episode of Seinfeld that explains object-oriented programming:

INT. MONK’S CAFE – DAY

Jerry, George, Elaine, and Kramer are sitting at a table, having coffee.

JERRY: So, I’m taking this computer programming class, and it’s all about this thing called object-oriented programming.

GEORGE: Oh, I’ve heard of that. It’s like, instead of writing a bunch of code, you just create these little objects that have their own properties and behaviors, right?

ELAINE: Yeah, I think so. It’s supposed to make programming a lot easier and more organized.

KRAMER: Hey, I know! Let’s use object-oriented programming to make a computer game about the Four Horsemen of the Apocalypse!

JERRY: (sarcastically) That’s a great idea, Kramer. I’m sure it will be a huge hit.

GEORGE: (rolling his eyes) Anyway, back to object-oriented programming. So, each of the Horsemen would be an object, right?

ELAINE: Yeah, and they would have their own properties, like their names, their weapons, and their horse colors.

KRAMER: And they would have behaviors, like riding around and causing chaos and destruction.

JERRY: (impressed) Wow, you guys actually know what you’re talking about. I never knew object-oriented programming could be so exciting.

ELAINE: (smirking) Who needs a computer game when we have our own little adventure right here?

The gang laughs as the scene fades to black.