explaingit

quoid/userscripts

4,500SwiftAudience · generalComplexity · 1/5LicenseSetup · easy

TLDR

An open-source Safari extension for Mac and iPhone that runs small JavaScript or CSS snippets on websites to change how they look or behave, like hiding ads or adding missing features to any site.

Mindmap

mindmap
  root((userscripts))
    What it does
      Run JS on websites
      Modify page appearance
      Safari on Mac and iOS
    Script Management
      Toggle scripts on or off
      Auto-update via metadata
      Install from user.js URLs
    Storage
      Plain files in a folder
      iCloud sync across devices
      In-place file editing
    Features
      Syntax highlighting editor
      JS linter built-in
      Domain blacklist
    Audience
      Power users
      Safari users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Hide ads or annoying banners on any website you visit in Safari on Mac or iPhone.

USE CASE 2

Add features to a website that does not offer them, like a dark mode or a custom keyboard shortcut.

USE CASE 3

Keep your collection of userscripts in sync between Mac and iPhone using iCloud.

USE CASE 4

Install community-made userscripts by visiting any .user.js URL directly in Safari.

Tech stack

SwiftJavaScriptCSSSafari Extension API

Getting it running

Difficulty · easy Time to first run · 5min

Install from the App Store and enable the extension in Safari Settings, on iOS a third-party editor is needed to write scripts.

Use freely for any purpose including commercial projects, as long as you keep the copyright notice.

In plain English

Userscripts is an open-source Safari extension for running small JavaScript and CSS snippets on websites you visit. These snippets, called userscripts, let you change how a page looks or behaves without modifying the site itself. Common uses include hiding ads, rearranging content, fixing annoyances, or adding features to sites that don't offer them. This extension brings that capability to Safari on both Mac and iPhone/iPad. The app is available through the Apple App Store and requires iOS 15.1 or higher, or macOS 12 with Safari 14.1 or higher. On macOS it includes a built-in code editor with features like syntax highlighting, bracket auto-closing, a JavaScript linter, and adjustable tab size. On iOS there is no built-in editor, so you edit script files using any third-party code editor that supports in-place file editing. Scripts are stored as plain files in a folder you choose. On macOS a default save location is set automatically. On iOS you pick the folder, and you can point it at an iCloud folder to keep scripts in sync between your Mac and iPhone, though the README notes that iCloud can evict files on older OS versions and recommends setting the folder to keep-downloaded on macOS 15 and iOS 18 or later. To add a script, you can visit any URL ending in .user.js in Safari and the extension will show an installation prompt, paste a remote URL directly in the interface, or drop a .user.js file into the scripts folder. Each script can be toggled on or off individually. Scripts that include version and update URL metadata tags can be updated with a single button click inside the editor. The extension also supports a global blacklist (domains where no scripts run), a per-script domain exclusion list, and a toolbar badge showing how many active scripts match the current page. The source code is MIT licensed.

Copy-paste prompts

Prompt 1
Write a userscript for the quoid/userscripts Safari extension that hides the sidebar on a specific website and makes the main content fill the full page width. Include the correct metadata block.
Prompt 2
Create a .user.js userscript file that adds a floating dark-mode toggle button to any website. Include the metadata block so quoid/userscripts picks it up automatically.
Prompt 3
Write a userscript for quoid/userscripts that automatically clicks the Accept Cookies button on any page that shows one, using common CSS selectors for cookie consent dialogs.
Prompt 4
How do I set the @match and @exclude metadata in a userscript for quoid/userscripts so it only runs on specific pages of a domain, not the whole site? Show examples.
Open on GitHub → Explain another repo

← quoid on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.