Custom Buttons on Your Bookmarks Bar: Build Bookmarklets & Userscripts with AI, No Coding Required
Missing a tiny feature on a site you use daily? Have AI write the bookmarklet or userscript for you. No setup, no deploy, done in 15-30 minutes.

Everyone keeps one or two small grievances about the websites they use daily: a panel that clutters a dashboard, prices that are painful to compare on a marketplace, a page full of article headlines you wish you could copy as a list, or a button that obviously should exist but nobody ever built. Until recently your options were two — put up with it, or learn to code. There is now a third path that is far faster: have an AI chatbot write the tiny tool, then paste it in. The two most practical formats are bookmarklets and userscripts: both are free, require no dev environment, no deployment, and each takes roughly 15-30 minutes to create. This guide walks you from zero to your first collection of custom buttons.
1. Know the Two Formats First
A bookmarklet is a regular bookmark whose content is not a URL but a snippet of JavaScript starting with javascript:. When you click it on any page, the code runs against that page immediately. This format suits actions you trigger on demand: collect all headings, enlarge the font, highlight prices above your budget.
A userscript is a script file that an extension such as Tampermonkey runs automatically every time you open a site matching its pattern. This format suits standing changes: hide the sidebar on a specific site, flag important keywords in color, or strip clutter on every visit.
The rule of thumb is simple: if you picture a button, build a bookmarklet; if you picture a rule that must apply forever, build a userscript.
2. Set Up a Five-Minute Workspace
Three steps and you are ready:
- Show the bookmarks bar (Ctrl+Shift+B in Chrome, Edge, or Firefox). This is where your buttons will live.
- Install Tampermonkey from your browser's extension store if you want to try userscripts. An important note for current Chrome users: since the transition to Manifest V3, new userscripts only run after you switch on the Developer mode toggle on the extensions page (chrome://extensions). Tampermonkey will guide you when the moment comes.
- Meet the browser console (F12, Console tab). You do not need to understand it; you only need to know how to copy the red error message to send to your AI assistant later.
3. Your First Bookmarklet: Describe the Problem, Not the Code
Beginners often ask for 'JavaScript code for...' packed with half-remembered technical details. What actually makes the AI's output immediately usable is context plus behavior:
I am not a programmer. Create a bookmarklet for me to use in Chrome.
Goal: on any news article page, collect all headings (h1, h2, h3 tags),
show them in a small panel in the top-right corner, and include a 'Copy all'
button that copies the headings to the clipboard as a numbered list.
Constraints: no external libraries, single file, and include beginner-friendly
installation steps (how to create the bookmark and paste the code).
Three elements of that prompt matter: name your browser (Chrome, Edge, and Firefox differ slightly), the 'no external libraries' constraint keeps the code portable, and asking for installation steps. Once the AI answers, executing takes 30 seconds: create a new bookmark on the bar, type any name, paste the code into the URL field, done.
4. Your First Userscript: Rules That Run Themselves
Now for the format that works without being clicked. Example use case: flagging expensive listings on a marketplace.
Create a userscript for Tampermonkey.
Behavior: on all marketplace listing pages (example domain: shop.example.com),
find the price number on each product card; if it is above $100, give the card
a light red background. Products load dynamically on scroll, so use
a MutationObserver.
Include the correct metadata header (@name, @match, @run-at)
and explain each metadata line in plain language.
The @match line decides which sites the script may run on — always check it, because that is your script's permission slip. To install: click the Tampermonkey icon, choose Create a new script, delete the template, paste the code, save with Ctrl+S. Open the target site and see the result. If the real site's structure does not match the example, that is normal — that is what the next section is for.
5. Fast Iteration: Report Symptoms, Not Verdicts
The first version will almost never be perfect — real sites have messier HTML than examples. Do not send 'it doesn't work'. Send three things: what happened, what you expected, and the console error.
The bookmarklet runs, but two issues: the panel appears bottom-left
(it should be top-right), and the copy button does nothing. The console shows:
Uncaught TypeError: Cannot read properties of undefined (reading 'writeText').
Here is my code: [paste the full code]
Fix these two issues, do not change anything else, and briefly explain what changed.
The phrase 'do not change anything else' matters: it stops the AI from rewriting the whole script and breaking the parts that already work. One or two rounds like this is usually enough to pass the test.
6. Maintain the Collection So It Lasts
- Name buttons by action, not by technique: 'Copy Article Headings', not 'js-thing-2'.
- Keep the source code in a notes app. Bookmarks can vanish during syncing; userscripts can be exported as .user.js files.
- When a site redesigns, scripts can die silently: nothing happens, no error. Send the AI a screenshot plus the target element's HTML (F12, copy element) and ask it to update the selectors.
- Before installing a stranger's userscript from a repository like Greasy Fork, paste the code into your AI and ask: 'explain this script as if I were a beginner; does anything send data outward?' Two minutes of AI-assisted reading is far cheaper than regret.
7. Safety Boundaries Worth Keeping
- Never run code you do not understand, including bookmarklets shared in forums. Ask the AI to summarize it first.
- Respect site rules: skip userscripts for paywall bypasses, mass scraping, or anything violating terms of service — your account is what is at stake.
- Do not install third-party userscripts on sensitive pages: online banking, or work dashboards holding customer data. Your own bookmarklet is fine; someone else's script is not.
- Remember that userscripts run with your permission on real pages. Test on a trivial page before letting them loose on an important one.
Start with the web annoyance that irritated you most this week. Use the prompt pattern 'I am not a programmer + goal + constraints + ask for installation steps', paste the result, and iterate once if needed. After three small tools accumulate on your bookmarks bar, you will start seeing the web not as a finished product, but as a space you are allowed to rearrange.
References
- MDN Web Docs — Bookmarklet — the official explanation of the bookmarklet concept.
- Tampermonkey Documentation — reference for userscript metadata headers.
- Tampermonkey FAQ — installation guidance, including the Developer mode note on Chrome.
- Greasy Fork — a public userscript repository for inspiration (read the code first).



