Basic Functions (For userscripts)

Useful functions for myself

Ini adalah versi dari skrip ini yang kodenya telah diperbarui. Tampilkan semua versi.

  • v1.8.1 23 Maret 2025
    • bug fix: mis-use of innerText and innerHTML in addStyle
  • v1.8 04 Maret 2025
    • improvement: now checkers run before detectDom runs
  • v1.7.1 03 Maret 2025
    • improvement: set oFunc's return value to FunctionLoader.FuncPool.CheckerNotPass when checker doesn't pass in FunctionLoader.#load
  • v1.7 03 Maret 2025
    • feat: FunctionLoader.FuncPool.load returns a promise that will resolve when all provided oFuncs loaded
  • v1.6.1 03 Maret 2025
    • bug fix: FunctionLoader.FuncPool constructor param default value missing
  • v1.6 03 Maret 2025
    • feat: new FunctionLoader.FunctionPool now accepts explicitly providing GM_getValue, GM_setValue, GM_deleteValue, and GM_listValues
  • v1.5 01 Maret 2025
    • feat: added this value customization for testChecker and provides oFunc as this value for testChecker in oFunc loading process
  • v1.4.1 24 Februari 2025
    • maintainence: jsdoc improvements
  • v1.4 06 Februari 2025
    • improvement: replace substorage with params in FunctionLoader
  • v1.3 03 Februari 2025
    • feat: diabled property of oFunc for FunctionLoader
  • v1.2 01 Februari 2025
    • feat: substorage support for FunctionLoader
  • v1.1.1 28 Januari 2025
    • bug fix: JSDoc annotation for $ and $All
  • v1.1 25 Januari 2025
    • maintainence: replace all TAB with four whitespaces
  • v1.0.1 25 Januari 2025
    • bug fix: incorrect parseArgs argument order
  • v1.0 25 Januari 2025
    • maintainence: Added JSdoc annotations
  • v0.10.3 24 Januari 2025
    • bug fix: incorrect exports
  • v0.10.2 24 Januari 2025
    • bug fix: isLoaded not exported
  • v0.10.1 24 Januari 2025
    • improvement: isLoaded for FunctionLoader
  • v0.10 24 Januari 2025
    • improvement: new FunctionLoader
  • v0.9 21 Desember 2024
    • improvement: loadFuncs now returns an instance of EventTarget, which dispatches two events func_load and all_load
  • v0.8.13 23 November 2024
    • improvement: always execute callback after current eventloop in detectDom
  • v0.8.12 08 September 2024
    • bug fix: multiple execution
  • v0.8.11 07 September 2024
    • bug fix: oFunc being loaded multiple times when being a dependency
  • v0.8.10 07 September 2024
    • oFunc.dependencies support: all oFuncs specified in oFunc.dependencies by their id will be loaded before oFunc.func itself executed
  • v0.8.9 07 September 2024
    • now loadFuncs has better support for AsyncFunction: get their return value using await
  • v0.8.8 06 September 2024
    • loadFuncs now supports objFunc.readonly to make their return value write-protected, and allows modifing return objects when objFunc.readonly is falsy
  • v0.8.7 06 September 2024
    • loadFuncs now saves return value only if objFunc.id exists and objFunc.func returns an object
  • v0.8.6.3 24 Maret 2024
    • bug fix for detectDom
  • v0.8.6.2 24 Maret 2024
    • bug fix for detectDom
  • v0.8.6.1 24 Maret 2024
    • queueTask now supports specifying different queue's sleep and max argument
  • v0.8.6 24 Maret 2024
    • added queueTask
  • v0.8.5.2 23 Maret 2024
    • bug fix
  • v0.8.5.1 23 Maret 2024
    • loadFuncs now accept detectDom property in both array format (for multiple selectors to detect) and string format (for single selector to detect) in objFunc
  • v0.8.5 23 Maret 2024
    • detectDom now works in both callback and promise mode, and prefers promise mode.
  • v0.8.4.2 22 Maret 2024
    • bug fix
  • v0.8.4.1 22 Maret 2024
    • bug fix
  • v0.8.4 22 Maret 2024
    • Assert support
    • testChecker, registerChecker, loadFuncs support
  • v0.8.3 29 Desember 2023
    • Update getUrlArgv
  • v0.8.2 19 November 2023

    detectDom: added support for attributes change

  • v0.8.1 15 September 2023

    bug fix

  • v0.8 15 September 2023

    detectDom now supports matching multiple selectors in one time

  • v0.7.2 28 Juli 2023

    fixed an error description mistake

  • v0.7.1 19 Juli 2023
    • detectDom now uses Set instead of Array to prevent duplicate added nodes
  • v0.7 17 Juli 2023
    • small bug fixes
    • addStyle now recieves parentElement, css, id as its arguments, and:
      • for shortcut: css, css, id, parentElement, css, id
      • removes old elements with same id in document when using this function with id provided
  • v0.6 17 Juli 2023

    Added detectDom, which provides ability to monitor document changes

  • v0.5 31 Maret 2023

    $$CrE: Create new element with pre-configs

  • v0.4 10 Februari 2023

    The third argument of DoLog now is changed from [Boolean]trace to [String]logger

  • v0.3.2 30 Januari 2023

    addStyle now returns the

  • v0.0.1.20230130165706 30 Januari 2023

    code improvements

  • v0.3 30 Januari 2023

    addStyle arguments support: css | parentElement, css | parentElement, css, attributes

  • v0.2 06 Desember 2022

    escJsStr支持转义\r,\n和\t

  • v0.1 05 Desember 2022