You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ Like this template? Please consider [supporting the development ❤️](https://
69
69
-**`src/config.ts`**
70
70
This file contains the DataStore instance that should be used to hold your userscript's configuration object.
71
71
The DataStore class is very powerful and does a lot of the heavy lifting for you. More instances can also be created to hold different types of data that should be persisted between sessions, cached in-memory for fast, synchronous access and be tagged with a version number, so migration functions can be used to migrate the data to any upcoming format.
72
-
For more info, please read the [DataStore documentation.](https://github.com/Sv443-Network/UserUtils#datastore)
72
+
For more info, please read the [DataStore documentation.](https://github.com/Sv443-Network/UserUtils/blob/main/docs.md#datastore)
73
73
-**`src/constants.ts`**
74
74
Contains some constant variables that are used throughout the userscript's runtime code.
75
75
This is where arguments are injected into the userscript's runtime code by `tools/post-build.ts`
@@ -78,7 +78,7 @@ Like this template? Please consider [supporting the development ❤️](https://
78
78
-**`src/observers.ts`**
79
79
This file should be filled up with many `SelectorObserver` instances. These observe a designated part of the DOM for changes.
80
80
With the function `addSelectorListener()`, you can then add a listener, given a specific CSS selector, that gets called when the selector has been found in the DOM.
81
-
For more info, please read the [SelectorObserver documentation.](https://github.com/Sv443-Network/UserUtils#selectorobserver)
81
+
For more info, please read the [SelectorObserver documentation.](https://github.com/Sv443-Network/UserUtils/blob/main/docs.md#selectorobserver)
82
82
-**`src/types.ts`**
83
83
Contains all generic TypeScript types that are used in multiple files.
84
84
-**`src/utils.ts`**
@@ -130,7 +130,7 @@ Like this template? Please consider [supporting the development ❤️](https://
130
130
- If you're using the [ViolentMonkey extension](https://violentmonkey.github.io/) (which I recommend), after running the command `npm run watch`, you may open the URL shown in the console in your browser and select the `Track local file` option in the installation dialog.
131
131
This makes it so the userscript automatically updates when the code changes (reloading the website is still necessary).
132
132
Note: the tab needs to stay open on Firefox or the script won't keep updating itself.
133
-
- My library [UserUtils](https://github.com/Sv443-Network/UserUtils) is already included as a dependency. It offers lots of utilities for userscripts like registering listeners for when CSS selectors exist, intercepting events, creating persistent JSON databases, modifying the DOM more easily, various math and array functions and more. You can find the full list of features and their documentation [here.](https://github.com/Sv443-Network/UserUtils#table-of-contents)
133
+
- My library [UserUtils](https://github.com/Sv443-Network/UserUtils) is already included as a dependency. It offers lots of utilities for userscripts like registering listeners for when CSS selectors exist, intercepting events, creating persistent JSON databases, modifying the DOM more easily, various math and array functions and more. You can find the full list of features and their documentation [here.](https://github.com/Sv443-Network/UserUtils/blob/main/docs.md#table-of-contents)
134
134
- Libraries that are required at runtime should be declared inside `require.json`, as long as they are hosted on a CDN and expose a global variable.
135
135
This way, they will be loaded using the `@require` directive and will be exempt from [minification rules](https://greasyfork.org/en/help/code-rules) on platforms like GreasyFork.
136
136
You may use a service like [jsDelivr](https://www.jsdelivr.com/) to include any npm library this way.
0 commit comments