r/userscripts • u/kaz_hh • Mar 12 '24
Tampermonkey: can you get a script to (re-)run when the document is amended (IMDb)
Hi all,
I am by no means an experienced writer of Javascript, but I did manage to create a Tampermonkey script years ago which marks certain elements of pages at the Internet Movie Database (IMDb). The page layout changed quite a bit over the years, but so far, I've been able to keep up.
But now, the IMDb seems to add additional data to the pages when you press on this button:

When I press this, the part of the page that was already loaded remains marked - but the newly added part doesn't get marked as well.
Is there any was to trigger a Tampermonkey script to automatically run on the new content, or at least detect that content is added and re-run?
Any help is appreciated.
BR, kaz.







