MutationObserver wrapper to wait for the specified CSS selector
< Σχολιασμός για τον κώδικα setMutationHandler
Nvm. Finally figured out what I was doing wrong. If you follow the documentation instead of making it up as you go along, it disconnects as expected.
This script is magic
Hey @wOxxOm I've been using the 'for' loop version of this forever in lots of scripts, but I never really learned how to get the most out of it. I've left the observer connected unnecessarily in some cases, so I'm trying to figure out how to use it properly. I can get the 'forEach' loops working, but IDEK how to confirm that the observer has disconnected properly though.
What I'm trying:
Not sure if
return false;
should go after both 'ifs', or inside, or something else entirely. Works either way, but I have no clue if it's actually disconnecting, or if it is, if they're both completing by sheer luck. I've tried adding console logs to the disconnect conditions in the library itself, and get nothing. I can't find anything in event listeners. How can I tell if it disconnected successfully?Also, are all the options enabled by default? They all seem to work without adding any customizations, so do I even need to add
processExisting: true
?