Skip to content

Instantly share code, notes, and snippets.

@ajfg93
ajfg93 / waitForKeyElements.js
Created May 9, 2021 14:22 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);