Greasy Fork is available in English.

NH_web

Common patterns for working with the WEB API.

Estas são as versões deste script em que houve atualização do código. Mostar todas versões.

  • v6 31/12/2023

    Factor roCallback() out of otrot2().

    This is to be consistent with otmot() and otrot().

    While in here, also added an initial call to the monitoring function and a logging statement, again, simply for consistency.

    Issue #221.

    Bump version number.

  • v5 29/12/2023

    Invoke the otmot() monitor function once at the start.

    Not unlike the "one last try" a few lines above, there might be situations where the criteria has already been met, but no mutations have been observered and no time out.

    Issue #218.

    JSDoc: Fix typo in comment.

    Issue #221.

    Factor roCallback() out of otrot().

    This is to be consistent with otmot().

    While in here, also added an initial and final calls to the monitoring function. Previously the final call was explicitly avoided in otrot(), but upon reflection, seems to cause no harm. Similarly, the initial call was just added to otmot() and seems reasonable here.

    Issue #221.

    Bump version number.

  • v4 26/12/2023

    Factor moCallback() out of otrot().

    The function was getting a bit long, so pulled out the MutationObserver callback.

    Also fixed a minor cosmetic issue where, during the "one last try" run of the callback, a "rejecting after timeout" message would still be logged.

    Issue #221.

    Bump version number.

  • v3 08/12/2023

    Promote SPA.dumpInfoAboutElement() to lib/web.js.

    Issue #205.

    Bump version number.

  • v2 07/11/2023

    Give the monitor function one last try in otmot().

    We already do similar in otrot2(), and the change there just makes the coding look similar.

    We also make use of this pattern in a recent change to Scroller.

    Sometimes otmot() monitor functions do not inspect the records, but instead it is easier to just poll a global state to see if it valid. In those cases, the observeOptions may not be precise enough, and an important mutation missed. This change gives everything a chance to resolve successfully.

    A similar change was NOT made to otrot() because the options are set in the function and anything missed is a bug in the library.

    Issue #150.

    Bump version numbers.

  • v1 28/10/2023

    Migrate a number of functions to lib/web.

    These include clickElement(), focusOnElement(), and isInput().

    I have no idea how I missed these when I added the otmot family.

    Issue #167.

  • v0 28/10/2023
  • v0 28/10/2023 Imported from URL