Skip to content

Releases: Sv443-Network/UserUtils

v4.0.0

21 Nov 14:13
fa51d70
Compare
Choose a tag to compare

Major Changes

  • dae5450: Removed amplifyMedia function due to massive inconsistencies in sound quality

Minor Changes

  • 168c2aa: Added functions compress and decompress to compress and decompress strings using gzip or deflate
  • 49bc85e: Added utility types NonEmptyString and LooseUnion

Patch Changes

  • 2ae665d: fixed wrong TS type for SelectorObserver options in constructor

v3.0.0

12 Nov 23:11
375e8a1
Compare
Choose a tag to compare

Major Changes

  • 1859022: onSelector() has been turned into the SelectorObserver class to reduce the performance impact on larger sites:

    • its instances can be scoped to any element lower in the DOM tree, unlike before where it was always observing the entire body with all its children
    • separate instances can be disabled and reenabled individually on demand
    • separate instances can have different MutationObserver options set to further reduce performance impact
    • the separation into instances allows for a new "chaining" paradigm where selector listeners are only added and checked for once they are actually needed (see examples in the documentation)
    • when using chaining, separate instances can be created and have listeners added to them before their base element is available in the DOM tree
    • every listener can have a set debounce time, so that it doesn't get called too often (works the same as the debounce() function, but is disabled by default)
    • there are now multiple methods to get and delete specific listeners

    The SelectorObserver.addListener() method is backwards compatible with the old onSelector() function, so you can just add the class instance in front (for full backwards compat use document.body for the baseElement parameter of the constructor), then change the old function's name and it should work as before.
    For more info and examples, please view the SelectorObserver documentation

Minor Changes

  • 0db73b5: Removed the limiter (DynamicsCompressorNode) from amplifyMedia() for clear and undistorted audio.

    Notable changes:

    • The property source has been renamed to sourceNode to fit the naming of the gainNode property
    • A boolean property enabled has been added to check if the amplification is enabled or not
    • The parameter initialMultiplier has been renamed to initialGain to reduce confusion (it is not a multiplier strictly speaking)
  • 736784f: Added function randomId() to randomly generate cryptographically strong hexadecimal IDs

  • 563e515: Added utility type NonEmptyArray for typing an array with at least 1 item

Patch Changes

  • a123da6: Added @linkcode references to the JSDoc in-IDE documentation

v2.0.1

04 Oct 15:39
81c5de7
Compare
Choose a tag to compare

Patch Changes

  • 63af1a7: Change default limiter options to be more balanced

v2.0.0

01 Oct 16:10
365cf18
Compare
Choose a tag to compare

Major Changes

  • b53a946: Added compression to amplifyMedia() to prevent audio clipping and distortion and modified return type accordingly:
    • Renamed: amplify() to setGain() and getAmpLevel() to getGain()
    • Added properties: enable(), disable(), setLimiterOptions() and limiterNode
    • Other changes: Amplification is no longer enabled automatically, enable() must now be called manually after initializing

v1.2.0

21 Sep 17:54
e2f8129
Compare
Choose a tag to compare

Minor Changes

  • 84b37f1: Added utility type Stringifiable to describe a string or any value that can be converted to one
  • 142c5e2: Added function insertValues() to insert values into a string with placeholders
  • 16ce257: Added lightweight translation system

v1.1.3

19 Sep 21:49
d3d087b
Compare
Choose a tag to compare

Patch Changes

  • ad17374: Add support for OpenUserJS

v1.1.2

16 Sep 20:28
824e724
Compare
Choose a tag to compare

Patch Changes

  • 049aeb0: Export ConfigMigrationsDict for easier use with TypeScript

v1.1.1

14 Sep 13:11
4d09e31
Compare
Choose a tag to compare

Patch Changes

  • 4799a9f: Fix TS error in ConfigManager migration functions

v1.1.0

12 Sep 20:10
868959f
Compare
Choose a tag to compare

Minor Changes

  • db5cded: Added isScrollable() to check whether an element has a horizontal or vertical scroll bar

Patch Changes

  • 9e26464: Replaced most occurrences of HTMLElement in the docs with Element for better compatibility

v1.0.0

07 Sep 19:43
88b79bf
Compare
Choose a tag to compare

Major Changes

  • a500a98: Added ConfigManager to manage persistent user configurations including data versioning and migration

Patch Changes

  • 6d0a700: Event interceptor can now be toggled at runtime (#16)
  • d038b21: Global (IIFE) build now comes with a header