Userscript Core

Shared runtime, utilities and build tooling for every userscript in this repository. Write features, not plumbing.

v0.1.1LibraryPolyForm-Strict-1.0.01 min read

Shared runtime, utilities and build tooling for every userscript in this repository. Write features, not plumbing.

What you get#

  • A Userscript runtime with a feature registry, mutation-driven updates, navigation events and a command registry.
  • A Feature base class with enable/disable hooks and automatic cleanup.
  • Storage, logger, DOM helpers, waiting, HTTP, menu sync, style injection and a page fetch observer.
  • A build helper that generates the metadata header and bundles the script.

This is a library. It is bundled into each userscript and is not installed on its own.

Quick start#

sh
bun scripts/new-userscript.ts my-script "My Script"

Then read Getting started and the API reference.

Edit this page on GitHub

Search documentation

Jump to any page or section.

Better Perplexity
Install
Features
Shortcuts
Community prompts
Privacy
Troubleshooting
Built on the shared core
Development
License
Getting started
Install
Take the tour
Where things are
Turn modules on and off
Usage tracking
What the badge shows
Which mode is shown
Refill estimates
Refill estimates
When the numbers look wrong
Long messages
The size meter
Big messages
Sending in parts
Attaching as a file
Accuracy
Prompts and batches
Prompt library
Placeholders
Community prompts
Batch Runner
Code blocks and export
Code blocks
Exporting a thread
Citation styles
Shortcuts and settings
Default shortcuts
Enter as newline
Command palette
Selection toolbar
Layout
Architecture
What the core provides
What stays in Better Perplexity
Compatibility
Building from source
Troubleshooting
A button is missing
Usage shows free-tier numbers
My draft disappeared
Export fails
Updates do not arrive
The build cannot find @nolly/core
Reporting a bug
Changelog
[1.0.3] - 2026-11-09
Fixed
Changed
[1.0.2] - 2026-11-09
Changed
[1.0.1] - 2026-11-09
Changed
Fixed
[1.0.0] - 2026-11-08
Added
Community prompts
Suggest a prompt
Userscript Core
What you get
Quick start
Getting started
Scaffold
A feature
Wire it up
Cleanup
API reference
Runtime
Feature
Utilities
Build
Build and release
Changelog
0.1.1
0.1.0