Greasy Fork is available in English.

Itsnotlupus' Tiny Utilities

small utilities that I'm tired of digging from old scripts to put in new ones.

Ниже показаны версии этого скрипта, в которых изменялся код. Показать все версии.

  • вер. 1.27.1 07.09.2023
  • вер. 1.27 07.09.2023

    renamed `visit()` to `traverse()`, because it seems slightly more self-explanatory.

  • вер. 1.26 07.09.2023

    added `visit()` to recurse through a json-ish object structure.

  • вер. 1.25 04.09.2023

    Added `makeDraggable` to scaffold boring event plumbing. Don't like the name. whatever.

  • вер. 1.24 02.09.2023

    fix minor brain damage in custom()

  • вер. 1.23 27.08.2023

    added `decodeEntities()`

  • вер. 1.22 25.08.2023

    log() is now log()/warn()/error(). yay.

  • вер. 1.21 16.08.2023

    Great. Another helpful polyfill (dom-shims) breaks basic browser behavior by refusing to run `element.append()` without arguments.
    Thanks helpful polyfill for old browsers that's something running in latest chrome.

  • вер. 1.20 14.08.2023

    keep `addStyles()` working even when we run super-early and document.head is still null.

  • вер. 1.19 07.08.2023

    added a `logGroup` function, works along `withLog()` and `log()`, but unlike log(), it collapses its args past the msg.

  • вер. 1.18 07.08.2023
  • вер. 1.17 07.08.2023

    use a lighter touch in fixConsole.

  • вер. 1.16 06.08.2023

    `fixConsole()` returns a method to undo its changes (and therefore, "unfix" the console object.)

  • вер. 1.15 03.08.2023

    memoize tweaks:
    - slightly more expansive mkKey() default,
    - changed semantics to no longer memoize null or undefined values.
    (I probably have a reason for this, and the nullish coalescing golfing is entirely coincidental. erm.)

  • вер. 1.14 31.07.2023
  • вер. 1.13 31.07.2023

    unbreaking async contract in `until` and `untilDOM`

  • вер. 1.13 31.07.2023

    until and untilDOM return without waiting if the condition passed is already truthy/the CSS selector is found.

  • вер. 1.12 31.07.2023
  • вер. 1.11 31.07.2023

    add an EZ-cleanup return function to events().

  • вер. 1.10 29.07.2023

    memoization

  • вер. 1.9.1 27.07.2023

    document is a Node.

  • вер. 1.9 16.07.2023

    add `fixConsole()`

  • вер. 1.8 11.07.2023

    Brownian golfing.

  • вер. 1.7 10.07.2023

    gotta commit to the bit. ah! get it?

  • вер. 1.6 10.07.2023

    renamed getHTML/getJSON to fetchHTML/fetchJSON. more pointless golfing.

  • вер. 1.5 09.07.2023

    Some basic network stuff: xhr, getHTML, getJSON, and prefetch methods

    None of them require a @grant.

  • вер. 1.4 09.07.2023

    many user scripts add styles, so here's `addStyles()`. cool.

  • вер. 1.3 09.07.2023
    • added events() utility to define multiple listeners in one shot.

    Example usage:

    let [ delta, drag ] = [0,0];
    events({
      mousedown() { [ delta, drag ] = [0,1] },
      mousemove(e) { if (drag) scrollBy(0, delta=-e.movementY) },
      mouseup() { drag=0; rAF((_,n) => Math.abs(delta*=0.95)>1 && n(scrollBy(0, delta))) }
    });
    
  • вер. 1.2 09.07.2023

    added requestAnimationFrame wrapper

  • вер. 1.1 25.06.2023

    Added some DOM query shortcuts.

  • вер. 1.0.1 11.06.2023

    Typo fix

  • вер. 1.0 10.06.2023