您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Functions and other tools for GreaseMonkey UserScript development.
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/440463/1021292/greasetools.js
Functions and other tools for GreaseMonkey UserScript development.
Documentation for the main branch is hosted at https://greasetools.adamts.me.
Documentation can be built from a cloned repository by running yarn doc
.
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.
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 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!',
}),
)
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" />
GreaseTools is licensed under either of
at your option.
[build badge]: https://img.shields.io/gitlab/pipeline-status/MysteryBlokHed/greasetools [npm badge]: https://img.shields.io/npm/v/greasetools [license badge]: https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-green
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址