ScriptPanda
Add to Chrome

What is a userscript? A plain-English guide

A userscript is a small piece of JavaScript that changes a website after it loads. What one looks like, what runs it, what it can do, and how to get one.

23 October 2026 · 4 min read

A userscript is a small program that changes a website for you, in your own browser. It can hide something you never want to see, add a button the site forgot, or tidy up a page that's hard to read. The site itself doesn't change. Only your copy of it does, each time you open it.

If you've heard people talk about Tampermonkey or Greasy Fork, this is what they mean.

What one looks like

A userscript is a single JavaScript file with a short header at the top. Here's a complete one:

// ==UserScript==
// @name         Wider article column
// @match        https://example.com/articles/*
// @grant        none
// ==/UserScript==

document.querySelector("main")?.style.setProperty("max-width", "none")

The header says what the script is called and where it runs. The line underneath is the script itself: it finds the main part of the page and lets it use the full width.

The three header lines you'll see most:

  • @name is the script's name, as it shows in your list of scripts.
  • @match says which pages it runs on. https://example.com/articles/* means every page whose address starts with https://example.com/articles/.
  • @grant asks for extra abilities, such as storing a setting between visits. none means it only needs the page.

What runs it

Browsers don't run userscripts on their own. You need an extension that does, called a userscript manager. Tampermonkey is the best known, and there are others, which we compare in Tampermonkey alternatives.

The manager keeps your scripts, checks each page you open against every script's @match line, and runs the ones that fit. Most also let you switch a script off, edit it, and update it when its author publishes a new version.

In Chrome there's one more step. Since Manifest V3, Chrome only lets an extension run scripts you supply once you've turned on Allow User Scripts for it. If a script does nothing at all, that switch is the first thing to check. We explain it in Userscripts not working in Chrome?

What a userscript can do

Anything the page's own JavaScript could do, on the pages it matches:

  • Hide things: a sidebar, a pop-up, a feed, a row of recommendations.
  • Add things: a button that exports a table, copies a link, or fills a form.
  • Change how things look: wider text, bigger fonts, a dark theme.
  • Do repeated clicks for you: expand every section, select every item, move to the next page.

Because a userscript runs again each time the page loads, the change sticks. That's the difference from pasting code into the browser's console, which is gone on the next reload.

What it can't do

A userscript lives inside the page. That sets its limits:

  • It only runs while the page is open in your browser, on your computer.
  • It sees what the page shows you, and nothing on the site's servers that the page doesn't load.
  • It can't change Chrome itself, other extensions, or pages it doesn't match.
  • When a site redesigns, a script that relied on the old layout can stop working, and needs updating.

Is it safe?

A userscript can read and change everything on the pages it runs on, including what you type there. So treat one like any other software: install scripts from sources you trust, look at the @match line to see where it runs, and be wary of a script that matches every site when its job is about one.

Scripts you write yourself, or have written for you on the page, have the advantage that you can read exactly what they do.

How to get one

There are three ways:

  1. Install one someone else wrote. Sites such as Greasy Fork list thousands of published scripts. Install a manager, then the script.
  2. Write it yourself. If you know some JavaScript, you start with the header above and the page's own structure.
  3. Have one written from a description. Chat assistants can draft a script, but they can't see the page, so they guess at its structure. We go through why that often fails, and what works better, in How to write a userscript with AI.

ScriptPanda takes the third route from inside the page: you describe the change in its side panel, it reads a trimmed outline of the page, then writes the userscript, installs it and runs it. It's a different tool from a manager like Tampermonkey, and ScriptPanda vs Tampermonkey sets out when to use which.

The short version

A userscript is a small, permanent change to a website that lives in your browser. A manager runs it, Chrome asks you to allow it once, and from then on the site works the way you want each time you open it.

Keep reading

All postsAll how-to guidesComparisons

Build a tool for the site you're on.

Plans from $9/month · Chrome 138+ · Works on any site

ScriptPanda
Add to Chrome
1

Add it to Chrome

One click from the Web Store. Chrome will ask for the permission ScriptPanda needs to add tools to pages.

2

Open the side panel

On whatever page is annoying you. ScriptPanda can already see it; there's nothing to configure first.

Hide the recommended sidebar

3

Ask for the change

In plain English. It builds the tool, installs it on that site, and runs it — and it's still there tomorrow.