@sv443-network/userutils 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.global.js +1 -1
- package/dist/lib/SelectorObserver.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.global.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// ==UserLibrary==
|
|
10
10
|
// @name UserUtils
|
|
11
11
|
// @description Library with various utilities for userscripts - register listeners for when CSS selectors exist, intercept events, manage persistent user configurations, modify the DOM more easily and more
|
|
12
|
-
// @version 4.2.
|
|
12
|
+
// @version 4.2.1
|
|
13
13
|
// @license MIT
|
|
14
14
|
// @copyright Sv443 (https://github.com/Sv443)
|
|
15
15
|
|
|
@@ -26,6 +26,7 @@ export type SelectorObserverOptions = {
|
|
|
26
26
|
/** Whether to ensure the observer is enabled when a new listener is added - default is true */
|
|
27
27
|
enableOnAddListener?: boolean;
|
|
28
28
|
};
|
|
29
|
+
export type SelectorObserverConstructorOptions = MutationObserverInit & SelectorObserverOptions;
|
|
29
30
|
/** Observes the children of the given element for changes */
|
|
30
31
|
export declare class SelectorObserver {
|
|
31
32
|
private enabled;
|
|
@@ -39,13 +40,13 @@ export declare class SelectorObserver {
|
|
|
39
40
|
* @param baseElementSelector The selector of the element to observe
|
|
40
41
|
* @param options Fine-tune what triggers the MutationObserver's checking function - `subtree` and `childList` are set to true by default
|
|
41
42
|
*/
|
|
42
|
-
constructor(baseElementSelector: string, options?:
|
|
43
|
+
constructor(baseElementSelector: string, options?: SelectorObserverConstructorOptions);
|
|
43
44
|
/**
|
|
44
45
|
* Creates a new SelectorObserver that will observe the children of the given base element for changes (only creation and deletion of elements by default)
|
|
45
46
|
* @param baseElement The element to observe
|
|
46
47
|
* @param options Fine-tune what triggers the MutationObserver's checking function - `subtree` and `childList` are set to true by default
|
|
47
48
|
*/
|
|
48
|
-
constructor(baseElement: Element, options?:
|
|
49
|
+
constructor(baseElement: Element, options?: SelectorObserverConstructorOptions);
|
|
49
50
|
private checkAllSelectors;
|
|
50
51
|
private checkSelector;
|
|
51
52
|
private debounce;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sv443-network/userutils",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Library with various utilities for userscripts - register listeners for when CSS selectors exist, intercept events, manage persistent user configurations, modify the DOM more easily and more",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|