b53a946
: Added compression to amplifyMedia()
to prevent audio clipping and distortion and modified return type accordingly:
amplify()
to setGain()
and getAmpLevel()
to getGain()
enable()
, disable()
, setLimiterOptions()
and limiterNode
enable()
must now be called manually after initializing84b37f1
: Added utility type Stringifiable to describe a string or any value that can be converted to one142c5e2
: Added function insertValues() to insert values into a string with placeholders16ce257
: Added lightweight translation systemad17374
: Add support for OpenUserJS049aeb0
: Export ConfigMigrationsDict for easier use with TypeScript4799a9f
: Fix TS error in ConfigManager migration functionsdb5cded
: Added isScrollable()
to check whether an element has a horizontal or vertical scroll bar9e26464
: Replaced most occurrences of HTMLElement
in the docs with Element
for better compatibilitya500a98
: Added ConfigManager to manage persistent user configurations including data versioning and migration6d0a700
: Event interceptor can now be toggled at runtime (#16)d038b21
: Global (IIFE) build now comes with a headerf97dae6
: change bundling process18d4a10
: make npm bundle smalleraa8efbd
: fix documentation54e7905
: Features:
amplifyMedia()
to boost the volume of a MediaElement past its default maximumMutationObserver.observe()
options to be passed to initOnSelector()
Fixes:
onSelector()
not triggering correctly85ec87b
: fix missing export for array functions231a79c
: Refactored code and documentation and added new functions:
mapRange()
to map a number from one range to the same spot in another rangerandRange()
to generate a random number between a min and max boundaryrandomItem()
to return a random item from an arrayrandomItemIndex()
to return a tuple of a random item and its index from an arraytakeRandomItem()
to return a random item from an array and mutate it to remove the itemrandomizeArray()
to return a copy of the array with its items in a random order7edf837
: decrease npm bundle size07ec443
: add getSelectorMap()
to return all currently registered selectors0cf2254
: add onSelector()
to call a listener once a selector is found in the DOMbb60db0
: minor fixes9206f6e
: Initial release - Features:
onSelector()
to call a listener once a selector is found in the DOMautoPlural()
to automatically pluralize a stringclamp()
to clamp a number between a min and max valuepauseFor()
to pause the execution of a function for a given amount of timedebounce()
to call a function only once, after a given amount of timegetUnsafeWindow()
to get the unsafeWindow object or fall back to the regular window objectinsertAfter()
to insert an element as a sibling after another elementaddParent()
to add a parent element around another elementaddGlobalStyle()
to add a global style to the pagepreloadImages()
to preload images into the browser cache for faster loading later onfetchAdvanced()
as a wrapper around the fetch API with a timeout optionopenInNewTab()
to open a link in a new tabinterceptEvent()
to conditionally intercept events registered by addEventListener()
on any given EventTarget objectinterceptWindowEvent()
to conditionally intercept events registered by addEventListener()
on the window object