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
目前为 2024-02-16 提交的版本。查看 最新版本。
这些是代码更新过的版本。 显示所有版本
- Fixed include settings for JSR
Mixins
Debouncer.getListeners()
stores
DataStoreSerializer
loadStoresData()
resetStoresData()
deleteStoresData()
interceptEvent()
serializePartial()
deserializePartial()
purifyObj()
toString
__proto__
DataStoreSerializer.serialize()
isDomLoaded()
@run-at
roundFixed()
probeElementStyle()
onDomLoad()
bitSetHas()
withDecimals
digitCount()
ChecksumMismatchError
DataMigrationError
PlatformError
UUError
date
Error
ListWithLength
length
count
size
autoPlural()
signal: AbortSignal
rejectOnAbort: boolean
pauseFor()
-y
-ies
getListLength()
pluralType
"auto"
num
tr.transforms.percent
@module
additionalProps
openInNewTab()
GM.openInTab()
docs.md
README.md
randRange()
enhancedEntropy = true
tr("foo.bar.baz")
ValueGen
StringGen
consumeGen()
consumeStringGen()
clamp()
min
window
unsafeWindow
signal
fetchAdvanced()
mapRange()
max
Prettify
randomCase
randomId()
migrateIds
DataStore
enhancedEntropy
migrateId()
exports.types
types
exports
module
hexToRgb()
rgbToHex()
#RGBA
#RRGGBBAA
alpha
blue
undefined
upperCase
lightenColor()
darkenColor()
tr.forLang()
tr.getTranslations()
setInnerHtmlUnsafe()
addGlobalStyle()
GM.openInTab
background
SelectorObserver
debounce()
ConfigManager
defaultConfig
defaultData
deleteConfig()
deleteData()
_uucfg
getSiblingsFrame()
Error.stackTraceLimit
ConfigManager.loadData()
compress()
decompress()
encodeData()
decodeData()
disableOnNoListeners
enableOnAddListener
addGlobalStyle
fetchAdvanced
- Added function `observeElementProp` to watch for a property of an element to change that isn't observable with MutationObserver
amplifyMedia
compress
decompress
NonEmptyString
LooseUnion
- `onSelector()` has been turned into the `SelectorObserver` class to reduce the performance impact on larger sites ([see migration info here](https://github.com/Sv443-Network/UserUtils/blob/main/CHANGELOG.md#300))- Removed the limiter from `amplifyMedia()` for clear and undistorted audio and renamed properties ([see migration info here](https://github.com/Sv443-Network/UserUtils/blob/main/CHANGELOG.md#300))- Added function `randomId()` to randomly generate cryptographically strong hexadecimal IDs- Added utility type `NonEmptyArray` for typing an array with at least 1 item
Changed default limiter options to be more balanced
Added compression to amplifyMedia() to prevent audio clipping and distortion and modified return type accordingly:
amplifyMedia()
amplify()
setGain()
getAmpLevel()
getGain()
enable()
disable()
setLimiterOptions()
limiterNode
insertValues()
tr()
Added UserLibrary header
Exported ConfigMigrationsDict for easier use with TypeScript
Fixed TypeScript error in ConfigManager migrations
Added isScrollable() to check whether an element has a horizontal or vertical scroll bar
isScrollable()
code is no longer minified and now has a userscript header