user-script-utils

🚧 User Script Utils

These snippets can be used in user script managers that support ES modules.

Scripts can be imported like this:

import { addCss, delay, waitForElement, waitForElements } from 'https://esm.sh/gh/tinacious/user-script-utils@0.1.0'

See docs.

Install the dependencies:

npm install

Run the dev server with file watcher:

npm run dev

This will run the index.html file which supports hot reloading.

To test the static file, use a tool like static-server to serve the root directory and open the static.html file.

The above-mentioned links are provided here for convenience with the default ports:

  1. Create a new util
  2. Export it as a named export
  3. Add it to the main.ts barrel file so that it can be available from the root module
  4. Add it to the vite.config.js file so that it can be available as its own module
  5. Generate documentation by running npm run typedoc