Maude

Mod the web. Inject your own scripts into any page based on URL maudes.

Contents

Maude is a browser extension that lets you run custom JavaScript on specific websites.

Each maude you define matches a set of web pages (or apps) that you wish to maudify. Each maude runs whenever you visit a matching page, and can change the page's layout, add features, or automate tedious steps.

Getting started

  1. Install Maude from the Chrome Web Store. (version 0.1.1 is currently in review)
  2. Click the Maude icon in your toolbar to open the side panel.
  3. Click the + button to add a maude, or Import to add one from a manifest URL.

Creating a maude

Name

Kind of self-explanatory.

URL matcher

This defines which pages the script runs on (in combination with the condition below, if specified).

  • Wildcard: Use ? for a single character and * for any sequence. Example: https://*.example.com/* matches all pages on any subdomain of example.com.
  • Regex: Use a full JavaScript regular expression to match the page URL.

Script

Choose how to provide the JavaScript to inject:

  • Editor: Type or paste code into the editor.
  • Upload: Select a .js file from your computer.
  • From URL: Enter a URL that returns JavaScript. Only use sources you trust—the script runs with full page access.

Injection timing

  • Delay (seconds): Wait this many seconds after the page load (or after the condition starts being checked) before injecting. Use this when the page needs time to render.
  • Condition: JavaScript that runs in the page; the script is injected only if and when this expression returns a truthy value. For example, document.querySelector('.app') injects once that element exists.
    If you also set a delay, the condition is checked repeatedly at that interval until it passes.

Managing maudes

In the maude list, use the pencil icon to edit a maude. Use the bin icon to delete it; you'll be asked to confirm first.

If you added the script by uploading a file or fetching from a URL, you'll need to repeat this if you want to update the script (Maude doesn't re-read the source).

Publishing maudes

You can share a maude by publishing a maude.json manifest file. Others can add your maude by clicking Import in Maude and entering the manifest URL:

  • maude.json - JSON describing the maude (name, script as either a URL or raw JS, and injection configuration).
  • Your script file (if sharing as a separate file).

Manifest format:

  • name - Maude name (string).
  • matches - Single URL pattern, wildcard or regex (string).
  • Either:
    • js-url - Script URL: filename relative to the manifest URL, or full URL (string).
    • js-raw - Inline script: the JavaScript source as a string.
  • Optional: matcherMode - "wildcard" or "regex" (default wildcard).
  • Optional: injectionCondition - JavaScript expression that must be truthy before injection (string).
  • Optional: delaySeconds - Delay before injection (in seconds; number). If specified along with a condition, used as the interval between condition checks.

Example maude.json with script URL:

{
  "name": "My maude",
  "matches": "https://example.com/*",
  "js-url": "my-script.js"
}

Example with inline script (js-raw):

{
  "name": "My maude",
  "matches": "https://example.com/*",
  "js-raw": "document.body.style.background = 'linen';"
}

If maude.json is at https://yoursite.com/maude/maude.json and you use js-url with my-script.js, Maude fetches the script from https://yoursite.com/maude/my-script.js. With js-raw, no separate file is needed. Users can review and edit the imported maude before saving.

Use cases

  • Restyle or simplify a site (hide elements, change fonts or colours).
  • Add keyboard shortcuts or buttons to a web app.
  • Auto-fill forms or run one-off automation on pages you visit often.
  • Inject a small script that depends on the page's DOM or timing.

View on GitHub