Mirror of UserUtils' source code https://github.com/Sv443-Network/UserUtils
|
1 an în urmă | |
---|---|---|
.changeset | 1 an în urmă | |
.github | 1 an în urmă | |
lib | 1 an în urmă | |
.eslintrc.cjs | 1 an în urmă | |
.gitignore | 1 an în urmă | |
CHANGELOG.bak.md | 1 an în urmă | |
LICENSE.txt | 1 an în urmă | |
README.md | 1 an în urmă | |
package-lock.json | 1 an în urmă | |
package.json | 1 an în urmă | |
tsconfig.json | 1 an în urmă |
Various utilities for userscripts
addEventListener()
on any given EventTarget objectaddEventListener()
on the window objectIf you are using a bundler like webpack, you can install this package using npm:
npm i @sv443-network/userutils
Then, import it in your script as usual:
import * as userUtils from "@sv443-network/userutils";
// or
import { addGlobalStyle } from "@sv443-network/userutils";
Shameless plug: I also have a webpack-based template for userscripts in TypeScript that you can use to get started quickly.
If you are not using a bundler, you can include the latest release from GreasyFork by adding this directive to the userscript header:
// @require https://greasyfork.org/scripts/TODO
If you like using this library, please consider supporting development
This library is licensed under the MIT License.
See the license file for details.