Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

greasetools

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

greasetools

Functions and other tools for GreaseMonkey UserScript development.

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

GreaseTools Build Badge NPM Badge License Badge

Functions and other tools for GreaseMonkey UserScript development.

Documentation

Documentation for the main branch is hosted at https://greasetools.adamts.me. Documentation can be built from a cloned repository by running yarn doc.

Use

Most functions will require some @grant's to work properly, but can fall back to other things like the browser's localStorage if grants aren't found. Information for each function can be found in its docs.

In a Node project

To use in a Node project, add GreaseTools as a dependency.

# npm
npm install greasetools

# yarn
yarn add greasetools

You can then import and use GreaseTools functions:

import { valuesProxy, getValues } from 'greasetools'

const values = valuesProxy(
  await getValues({
    hello: 'World!',
  }),
)

In a normal UserScript

In a UserScript that isn't built with Node.js, you can @require the library:

// @require     https://gitlab.com/MysteryBlokHed/greasetools/-/raw/main/greasetools.user.js

You can replace main with a specific release tag like v0.1.0 to require a specific version:

// @require     https://gitlab.com/MysteryBlokHed/greasetools/-/raw/v0.1.0/greasetools.user.js

Functions are available on the global GreaseTools object:

const { valuesProxy, getValues } = GreaseTools

const values = valuesProxy(
  await getValues({
    hello: 'World!',
  }),
)
Type declarations

The types included with the npm package still work when the library is @require'd. Just add the types as a dev dependency for a Node project or install it globally. With the package installed, include the following reference line somewhere in your TypeScript source file:

/// <reference types="greasetools" />

License

GreaseTools is licensed under either of

at your option.

FAQs

Package last updated on 22 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc