How to Install User Scripts

Updated

1 min read#dev

Note

I updated this post in 2026. The original version covered browser extensions that no longer exist, like NinjaKit for Safari and Trixie for Internet Explorer.

GreaseMonkey logo

A user script is a small piece of JavaScript that runs on a web page to change how it looks or works. When userscripts.org disappeared in 2014, I started publishing my little scripts only as Chrome extensions. Then I needed one of them on Safari, and I took the chance to look at how user scripts work in different browsers.

Converting a script is simple: you add a metadata block at the top of the file. It also gives you some handy features, for example an update URL that points to the script in its remote repository, so the browser can update it for you.

// ==UserScript==
// @name        My script
// @match       https://example.com/*
// @updateURL   https://example.com/my-script.user.js
// ==/UserScript==

Install a user script manager

Browsers do not run user scripts on their own. You need an extension, called a user script manager:

On Chrome and other Chromium browsers, you also need to allow the manager to run user scripts. Open the extension details page and turn on Allow User Scripts (on older versions, turn on Developer mode instead).

Install a script

  1. Open a link to a file ending in .user.js.
  2. The manager shows the script’s code and the sites it runs on.
  3. Click Install.

To find scripts, look at Greasy Fork or OpenUserJS. A user script can read everything on the pages it runs on, so only install scripts from sources you trust.


Thoughts? Reply via emailSuggest an edit


NewerGit: How to Get All the Changes on a BranchOlderW3C Validation with Gulp