Skip to content

BlackGlory/eternity

Repository files navigation

Eternity

eternity-logo

A minimalist JavaScript user script loader and manager for modern browsers.

In order to use this extension, you need Chrome 120 or above, and developer mode enabled.

Supported browsers and platforms

  • Chrome

When do you need this?

When you want to load normal JavaScript scripts as user scripts, and

Example

// @name Hello World
// @match <all_urls>
// @world MAIN
import { addStyleSheet } from 'https://esm.sh/[email protected]'

addStyleSheet(`
  *:before {
    content: 'Hello'
  }

  *:after {
    content: 'World'
  }
`)

Metadata

You need to write the metadata as comments at the beginning of the script, refer to the example for the format.

@name

The name of the user script.

@match

Specifies which pages this user script will be injected into.

See Chrome Extensions match patterns.

You can specify multiple patterns via multiple @match.

@update-url

The update URL of the user script. This is optional, Eternity accesses the URL to keep the user script up to date.

You can specify multiple update URLs via multiple @update-url. Eternity will check them one by one in order until a usable user script is found.

@world

The JavaScript world for a user script to execute within. This is optional, the default value is the same as the extension API.

About

🌲 A minimalist JavaScript user script loader and manager for modern browsers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •