Recently, one of my most essential Chrome extensions was automatically disabled after an update. Google Chrome has migrated to Manifest V3 for extensions, causing older, unmaintained extensions to stop working. While I’ve dabbled with extension development in the past, I wasn’t familiar with the new manifest format. This presented a perfect opportunity to test the capabilities of AI assistants like ChatGPT and Claude.
The Problem
The extension in question was simple but critical to my workflow: it allowed me to right-click and post the current page or selection directly to Pinboard.in, my bookmarking service of choice. Pinboard offers a straightforward API for adding links – you simply use the pinboard.in/add URL and pass parameters for the title, link, and description. The service then displays a page where you can adjust these values or add tags before saving.
My initial approach was to ask ChatGPT to convert the old extension to the newer manifest format. This failed completely. Since I couldn’t verify the license of the original extension (the creator’s personal website is offline – I hope they’re okay!), I decided to build a new extension from scratch.
Building a new Plugin from Scratch with AI
I started by explaining my goal to ChatGPT and requesting a Manifest V3 template. This generated the foundational file I used moving forward. I think templating is a really good use case for AI assistants to make. But from there, things went a little awry.
For example, a seemingly simple request like:
"When I right click and select my 'post to pinboard' entry, I want a popup to appear with the pinboard.in/add page"
led to several iterations because my language wasn’t as precise as it should have been. First, ChatGPT created a Chrome popup using chrome.action.openPopup() which is technically correct based on my prompt, but not what I needed. Once I closed the Chrome popup, then a blank pinboard.in/add page opened in the browser window. The Title and Link info I entered into the popup did not pass to the pinboard window either. Obviously I was going to have to assume less of the AI when writing my prompts.
After clarification, the new code opened the pinboard.in/add page in a new tab which was closer, but still not ideal. I gave it one more try, clarifying I wanted a new window. Finally, it created a separate popup window, but it wouldn’t automatically close after submission
This inability to autoclose the window was tricky for ChatGPT. Once the user clicks the “Add Bookmark” button, the popup window just went completely white, but would not close, regardless of the command I tried in the listener callback function. This was frustrating because every time I asked for new code, ChatGPT would reply as if it had made some change, but you produce identical code. The responses were something like
You’re right, I added a window.close() call in the function to make the window close when the “Add Bookmark” button is clicked.
After multiple attempts with ChatGPT producing identical code despite my clarifications, I switched to Claude to see if it could help solve the popup closing issue. I pasted in my code and asked it for help closing the pop up window. Initially, Claude produced similar results, but after some persistence, it understood what I was trying to accomplish. In it’s final response, it mentioned making the popup window a “true popup” which is the solution I was looking for from the beginning.
With the “post page to Pinboard” feature working properly, I then extended the extension to work with selected text. When text is highlighted on a page, the extension now adds it as the description parameter in the Pinboard form – creating a more versatile bookmarking tool. The last step was making custom icons in inkscape and post it on github.
Installing and Using the Final Product
- Click here to see the complete, working extension is available on GitHub.
- To test this plugin, simply download the code as a zip file to you PC.
- Unzip this folder my right-clicking it and selecting “Extract All” if in windows.
- Then open chrome://extensions/
- In the top right corner, click to activate “Developer mode”
- This will show 3 additional button on the top right of the window. Click “Load Unpacked” and select the folder
- Then on any webpage, right-click and select “Post page to Pinboard” (Obviously you should have a pinboard.in account for this to work)
This project shows both the potential and limitations of using AI assistants for development tasks. While they excel at generating boilerplate code and understanding common patterns, precise implementation details sometimes require persistence and clear communication. You can spend longer debugging what they give you rather than just writing the code yourself, even if you aren’t familiar with all the details of the language. By asking the AI tools for a description of how to do atomic tasks, or how a particular function might work if you are unfamiliar, you’ll get farther than just expecting it to produce good ode on its own.